I've run pipreqsnb on a few different directories and it seems to consistently break when it runs into a file with "from" import in a notebook, or it has something to do with the "unknown" file, though I'm not sure what that means given all my ipynb files are named.
The console log doesn't show exactly what file it's breaking in so it's hard to debug as well.
Example (i've edited the paths for privacy):
pipreqs /home/<my_folder_path>
ERROR: Failed on file: /home/<my_folder_path>/__temp_pipreqsnb_folder/_pipreqsnb_temp_file.py
Traceback (most recent call last):
File "/home/.local/bin/pipreqs", line 8, in
sys.exit(main())
File "/home/.local/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 488, in main
init(args)
File "/home/.local/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 415, in init
candidates = get_all_imports(input_path,
File "/home/.local/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 131, in get_all_imports
raise exc
File "/home/.local/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 117, in get_all_imports
tree = ast.parse(contents)
File "/usr/lib/python3.8/ast.py", line 47, in parse
return compile(source, filename, mode, flags,
File "", line 268
from tools.preprocessing.pipeline_utils.feature_generator import wkts_to_wkt
^
SyntaxError: invalid syntax
I've run pipreqsnb on a few different directories and it seems to consistently break when it runs into a file with "from" import in a notebook, or it has something to do with the "unknown" file, though I'm not sure what that means given all my ipynb files are named.
The console log doesn't show exactly what file it's breaking in so it's hard to debug as well.
Example (i've edited the paths for privacy):
pipreqs /home/<my_folder_path>
ERROR: Failed on file: /home/<my_folder_path>/__temp_pipreqsnb_folder/_pipreqsnb_temp_file.py
Traceback (most recent call last):
File "/home/.local/bin/pipreqs", line 8, in
sys.exit(main())
File "/home/.local/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 488, in main
init(args)
File "/home/.local/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 415, in init
candidates = get_all_imports(input_path,
File "/home/.local/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 131, in get_all_imports
raise exc
File "/home/.local/lib/python3.8/site-packages/pipreqs/pipreqs.py", line 117, in get_all_imports
tree = ast.parse(contents)
File "/usr/lib/python3.8/ast.py", line 47, in parse
return compile(source, filename, mode, flags,
File "", line 268
from tools.preprocessing.pipeline_utils.feature_generator import wkts_to_wkt
^
SyntaxError: invalid syntax