Python file imports other python files using coverage run --source

Can you help me with this,
I have a Python file that imports other python files , failing at sonarqube unit test using jslPythonWrapper and not reading config.ini file and throwing error.

Hi,

Welcome to the community!

I don’t understand the situation here. Could you provide the logs from this process, including the full error?

 
Thx,
Ann

Hi Ann, Thanks for stepping in,
Here is my problem:

I’m facing an issue with integrating SonarQube for code inspection in my Jenkins pipeline. My project contains a Python file that imports several Python libraries (multiple .py files). The build in Jenkins is failing during the SonarQube code inspection step.

Here are the key points:

  • The required Python packages are already installed in the Docker image used in Jenkins.
  • The Jenkins pipeline is not triggering a successful SonarQube analysis, and the build fails.

I’ve ensured that SonarQube is configured correctly, but the inspection seems to not recognize some Python modules.

Has anyone faced a similar issue? What could be causing the SonarQube inspection to fail in Jenkins, and how can I resolve this?

Hi,

Could we have the full Jenkins job log, please?

 
Thx,
Ann