radon
radon copied to clipboard
Radon might detect Wget in Python as errors
Hullo! A piece of my data analysis code runs with no errors on Python 3.7.16.
However, when I use Radon on the same file, the following error occurs:
ERROR: invalid syntax (
The code at line 15 (which is where I presume the error occured) is:
# https://www.kaggle.com/shivamkushwaha/bbc-full-text-document-classification !wget -nc https://lazyprogrammer.me/course_files/nlp/bbc_text_cls.csv
It might be that Radon detects Wget in Python as syntax errors.
Hey @Chamomile-Cat, thank you for raising this issue.
Using Python 3.7.16 and radon 6.0.1, I executed radon against a Python file containing the mentioned comment and observed that it ran successfully. I suspect 'line 15' may belong to line 15 of another module - perhaps an internal radon module or another module locally.
I would be interested in supporting you to understand the root cause and whether a bug fix is required. Would you be able to provide:
- the radon version used
- the full output of the error messages
- a minimum file example that triggers the error - removing as much information as possible to narrow down the root cause
- the radon command executed against that file - running it with the file path rather than a directory path e.g.
radon mi src/affected_file.pyrather thanradon mi src/- which will ensure the issue relates to that particular file and not for example another file contained within the directory radon is run against