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
Rename json.py in outlines/generate #879
Comments
Oh and btw, if I resolve this one, same happens with the types module
|
This seems to be an issue with the way PyCharm is configured on your machine. Could you please try the solution from this similar issue and report back? |
It is related to PYTHONPATH for me. Agreed that this issue only happens with Pycharm due to the way they handle Pythonpath, but I still think that naming modules similar to native python modules is a bit confusing. |
Describe the issue as clearly as possible:
I am trying to debug outlines in PyCharm using pydev debugger (build 233.11799.298).
Upon running the debugger, I get the following error
AttributeError: partially initialized module 'json' has no attribute 'loads' (most likely due to a circular import)
which results from the naming of the
json.py
file. Renaming this file to anything other than the default python library resolved the issue.Steps/code to reproduce the bug:
Press the debug button on the top right of the UI in pycharm.
Expected result:
No circular imports
Error message:
Outlines/Python version information:
Version information
Outlines:
0.1.dev587+g4f8433d
Python3:
Python 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801]
Context for the issue:
See this stack overflow issue for a similar problem
https://stackoverflow.com/questions/20082730/module-object-has-no-attribute-loads-while-parsing-json-using-python
The text was updated successfully, but these errors were encountered: