Error during SonarQube Scanner execution - python

python

(Luis José Castillo) #1

I try to execute this command:

sonar-scanner.bat -Dsonar.projectKey=Analysis_3 -Dsonar.sources=. -Dsonar.host.url=http://localhost:9000 -Dsonar.login=aafaf1d73e204c3949db45675959a82f627cda0f

in the project’s folder.But it shows the following error:

INFO: Scanner configuration file: C:\sonar-scanner-3.2.0.1227-windows\bin…\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:\Users\lui19.sonar\cache
INFO: SonarQube server 7.3.0
INFO: Default locale: “es_CR”, source code encoding: “windows-1252” (analysis is platform dependent)
INFO: Publish mode
INFO: Load global settings
INFO: Load global settings (done) | time=73ms
INFO: Server id: BF41A1F2-AWYmlkwcWcgJAAzcqc2L
INFO: User cache: C:\Users\lui19.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=61ms
INFO: Load/download plugins (done) | time=92ms
INFO: Loaded core extensions:
INFO: Process project properties
INFO: Load project repositories
INFO: Load project repositories (done) | time=58ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=27ms
INFO: Load active rules
INFO: Load active rules (done) | time=977ms
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=25ms
WARN: SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
INFO: Project key: Analysis_3
INFO: Project base dir: C:\Users\lui19\Desktop\Analisadores\Codigo
INFO: ------------- Scan Analysis_3
INFO: Base dir: C:\Users\lui19\Desktop\Analisadores\Codigo
INFO: Working dir: C:\Users\lui19\Desktop\Analisadores\Codigo.scannerwork
INFO: Source paths: .
INFO: Source encoding: windows-1252, default locale: es_CR
INFO: Load server rules
INFO: Load server rules (done) | time=415ms
INFO: Index files
INFO: 1 file indexed
INFO: Quality profile for py: Sonar way
INFO: Sensor Python Squid Sensor [python]
WARN: Metric ‘comment_lines_data’ is deprecated. Provided value is ignored.
INFO: Sensor Python Squid Sensor [python] (done) | time=280ms
INFO: Sensor PythonXUnitSensor [python]
INFO: Sensor PythonXUnitSensor [python] (done) | time=2ms
INFO: Sensor SonarJavaXmlFileSensor [java]
INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=1ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=13ms
INFO: No SCM system was detected. You can use the ‘sonar.scm.provider’ property to explicitly specify it.
INFO: Calculating CPD for 1 file
INFO: CPD calculation finished
INFO: Analysis report generated in 118ms, dir size=40 KB
INFO: Analysis reports compressed in 24ms, zip size=12 KB
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 6.401s
INFO: Final Memory: 15M/232M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: The ‘report’ parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.


(Pierre-Yves Nicolas) #6

The error message doesn’t come from the python analyzer but from the scanner.
The analysis went fine but the scanner failed to send to analysis report to the server.
Can you please check the logs on the server side?