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 for uuid = "^1.30" #264

Open
jwk-qbllp opened this issue Feb 3, 2025 · 0 comments
Open

SyntaxError: invalid decimal literal for uuid = "^1.30" #264

jwk-qbllp opened this issue Feb 3, 2025 · 0 comments

Comments

@jwk-qbllp
Copy link

I encountered the following error when running the neo4j-graphrag-python package in Python 3.11 and above on an Azure virtual environment:

File "/tmp/8dd44716bf8f03e/antenv/lib/python3.12/site-packages/uuid.py", line 138
  if not 0 <= time_low < 1<<32L:
                                                ^
SyntaxError: invalid decimal literal

This error is caused by using the backport module uuid, which has been part of the standard library since Python 2.5. In the pyproject.toml file, the uuid module is specified on line 37:

uuid = "^1.30"

Since this library only supports Python 3.9 and above, I request that the uuid = "^1.30" dependency be removed from the file.

This Stack Overflow article helped me identify the root cause of the issue:
https://stackoverflow.com/questions/33612977/how-to-use-uuid-lib-with-mod-wsgi#comment55000535_33612977

My current workaround involves uninstalling the uuid library after deployment. For the Azure App Service web app, we set an app setting called POST_BUILD_COMMAND with the command:

python -m pip uninstall -y uuid
This fixed our issue, but it would be preferable not to have to do this.

Has anyone else encountered this?

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

1 participant