radon icon indicating copy to clipboard operation
radon copied to clipboard

Radon might detect Wget in Python as errors

Open Chamomile-Cat opened this issue 2 years ago • 1 comments
trafficstars

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 (, line 15)

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.

Chamomile-Cat avatar Oct 15 '23 06:10 Chamomile-Cat

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:

  1. the radon version used
  2. the full output of the error messages
  3. a minimum file example that triggers the error - removing as much information as possible to narrow down the root cause
  4. 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.py rather than radon 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

kieran-ryan avatar Oct 30 '23 23:10 kieran-ryan