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

Error with relatives imports "ImportError: No module named " #263

Open
puckk opened this issue Oct 16, 2018 · 1 comment
Open

Error with relatives imports "ImportError: No module named " #263

puckk opened this issue Oct 16, 2018 · 1 comment

Comments

@puckk
Copy link
Contributor

puckk commented Oct 16, 2018

I have a script that makes imports relative to the directory where it is (I have a file _ init_.py in the directory lib/parser/). And when you add the script to Wooey it does not find it.

image

@Chris7
Copy link
Member

Chris7 commented Oct 19, 2018

It is currently an open question how to handle these cases. Your script is uploaded to the wooey backend that then attempts to parse it. This is done in an area removed from where the script and thus relative imports are located. One idea to address this issue is found within #144 , and another implementation that would work currently is converting your script to a self-contained zip. There may be other solutions as well depending on how you are running the server (such as setting PYTHONPATH). I'm also open to other solutions.

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

No branches or pull requests

2 participants