Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: invalid decimal literal #433

Open
syheliel opened this issue Feb 10, 2024 · 1 comment
Open

SyntaxError: invalid decimal literal #433

syheliel opened this issue Feb 10, 2024 · 1 comment

Comments

@syheliel
Copy link

syheliel commented Feb 10, 2024

How to reproduce

git clone https://github.com/NVIDIA/cccl.git
cd cccl
pipreqs .

error msg

ERROR: Failed on file: ./libcudacxx/libcxx/utils/generate_feature_test_macro_components.py
Traceback (most recent call last):
  File "/home/xxx/miniforge3/envs/cupy/bin/pipreqs", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/xxx/miniforge3/envs/cupy/lib/python3.12/site-packages/pipreqs/pipreqs.py", line 528, in main
    init(args)
  File "/home/xxx/miniforge3/envs/cupy/lib/python3.12/site-packages/pipreqs/pipreqs.py", line 455, in init
    candidates = get_all_imports(input_path,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xxx/miniforge3/envs/cupy/lib/python3.12/site-packages/pipreqs/pipreqs.py", line 131, in get_all_imports
    raise exc
  File "/home/xxx/miniforge3/envs/cupy/lib/python3.12/site-packages/pipreqs/pipreqs.py", line 117, in get_all_imports
    tree = ast.parse(contents)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/xxx/miniforge3/envs/cupy/lib/python3.12/ast.py", line 52, in parse
    return compile(source, filename, mode, flags,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<unknown>", line 36
    "c++14": 201304L
                  ^
@vishalnandagopal
Copy link

vishalnandagopal commented Feb 25, 2024

Try upgrading pipreqs, they seemed to have fixed the UTF-8 issue.

pip install pipreqs --upgrade --no-deps
pip install yarg==0.1.9 docopt==0.6.2

This avoids the tons of unnecessary jupyter notebook modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants