Import errors inside reflex under the hood
Hi, team So Idk why u chose name ur packages inside reflex lib same names as packages but when i trying to run a reflex.py in my venv/reflex/reflex.py it throws an error:
Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/pydevd.py", line 1534, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/darkstrouk/Documents/test_sql_chat/sql_chat/my_env/lib/python3.9/site-packages/reflex/reflex.py", line 16, in <module>
from .reflex import constants
ImportError: attempted relative import with no known parent package
The same situation in ur chat repo - u named chat 2 packages and 1 folder and there is a lot of problems within it - it is forcing me to chane ur lib code but what to do with this import errors - idk, as well as ur AI assistant
pls help me with it if i just dont know about some special knowledge or hust refactor ur lib code
Specifics :
- Python Version: 3.9.6
- Reflex Version: latest
- OS: MacOs
Do you get this error when you do reflex run?
@Darkstrouk how are running your reflex app in pycharm? You don't need to run the reflex.py module if that's what you're doing. You need to run reflex init in your cli in a new directory and then reflex run in the new directory to run the app. Refer to this page in the docs for more info on how to do that.
closing this now, feel free to reopen if you feel the need to.