in my main.py, I need to import packages written by myself. But the /context/code dir does not have the execute permission, so my import always fails. Is there any solution?
Python does not require +x privileges to import other .py files.
Can you give me a Run ID I could look into?
#28497 #28467
I think I have correctly add the sys.path and also the init.py. In the local test, if I change the dir +x permission, It will yield the same error.
Your setup should already be correct without having to mess with the sys.path
.
You have the following error:
ModuleNotFoundError: No module named 'REDACTED.data'
However, you didn’t submitted any data/
directory in the REDACTED/
directory. Hence the error.
If your package is available on PyPI, I can whitelist it.
I am not finding it however. Could you please send me the PyPI page via DM (if you want to keep it private) or here if it is fine sharing it?
I do have the data
folder locally, but when I used crunch push
to upload it, the folder wasn’t included. I thought folders named data
might be automatically ignored, so I renamed it to pydata
and tried again, but it still didn’t work.
I was able to reproduce it locally, the problem was a bad handling of forced ignored files.
Please upgrade the crunch-cli (pip install --upgrade crunch-cli
) and try again. It should work fine now!
okay. It works. Thanks a lot!