Error running sonar cloud on github actions

Im trying to run an analysis in my repo using github actions configuration https://sonarcloud.io/summary/new_code?id=winnin_trending&branch=main , the analysis gives me the following null pointer:
ERROR: Unable to parse file: notebooks/trending_creators.py
ERROR: Parse error at line 20 column 0:

11: relativedelta
12:
13: today = datetime.datetime.today()
14:
15:
16: print(s3_paths)
17:
18:
19:
→ spark.conf.set(“spark.sql.execution.arrow.pyspark.enabled”, “true”)
21:
22:
23:
24:
25: from pyspark.sql.types import StringType, StructType, StructField, IntegerType, LongType,

WARN: Unable to analyze file: notebooks/trending_creators.py
java.lang.NullPointerException: null

It does not make any sense to me, and on the end it says the results is available in https://sonarcloud.io/summary/new_code?id=winnin_trending&branch=main but when i open the page i can see only the following error “main” branch has not been analyzed yet.

Additional details:
This is a python repo from a notebook coming from databricks on GIthub

Hello @ericholiveira ,
Does notebooks/trending_creators.py only use regular Python syntax?
At the time being Sonar doesn’t support notebooks special syntax.

Could you please share (even privately if you prefer) the full content of notebooks/trending_creators.py?

Thanks,
Andrea G.

It does use regular python syntax… how can i share it to you privately?

@ericholiveira , I contacted you privately.

Thanks!

Hello @ericholiveira ,

First, I’m very sorry for the late reply.
It looks like there is an indentation problem at line 20:

 spark.conf.set(“spark.sql.execution.arrow.pyspark.enabled”, “true”) # starts with a leading whitespace

This causes an indention error, hence we have a parsing error.

Could you please try to remove the leading whitespace at line 20 and restart the analysis on SonarCloud?