The built-in magic commands seem to be throwing the string cleaning step in pipreqsnb:
Exception occurred while working on file /home/hckr/ianozsvald/kaggle_optiver_volatility/notebooks/20210825_light.ipynb, cell 1/36
Traceback (most recent call last):
File "/usr/bin/pipreqsnb", line 11, in <module>
load_entry_point('pipreqsnb==0.2.4', 'console_scripts', 'pipreqsnb')()
File "/usr/lib/python3.7/site-packages/pipreqsnb/pipreqsnb.py", line 130, in main
raise e
File "/usr/lib/python3.7/site-packages/pipreqsnb/pipreqsnb.py", line 126, in main
imports += get_import_string_from_source(source)
File "/usr/lib/python3.7/site-packages/pipreqsnb/pipreqsnb.py", line 26, in get_import_string_from_source
tree = ast.parse(source)
File "/usr/lib/python3.7/ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 39
%ipython_memory_usage_start
^
SyntaxError: invalid syntax
The error seems to come from these lines in pipreqsnb's source. I suspect it has to do with the way the lines are being sanitized by this function. The offending Jupyter Notebook can be found here and the offending cell is the 1st one.
This should be an easy fix ... requiring only a few steps:
The
built-in magic
commands seem to be throwing thestring cleaning
step inpipreqsnb
:The error seems to come from these lines in pipreqsnb's source. I suspect it has to do with the way the lines are being sanitized by this function. The offending
Jupyter Notebook
can be found here and the offendingcell
is the 1st one.This should be an easy fix ... requiring only a few steps:
Unfortunately the maintenance seems to have died off ... so the main repo won't be reliable for using this tool moving forward.