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

ModuleNotFoundError: No module named '[x]'] #123

Open
ikb42 opened this issue Feb 21, 2024 · 2 comments
Open

ModuleNotFoundError: No module named '[x]'] #123

ikb42 opened this issue Feb 21, 2024 · 2 comments

Comments

@ikb42
Copy link

ikb42 commented Feb 21, 2024

When the server has recently started and the Node app has recently started (specifically AWS Elastic Beanstalk new instance deployed)

When I call pd = await python('pandas');
I get an error like this: ModuleNotFoundError: No module named 'pandas']
This is despite there definitely being such a module, I am using the env variable PYTHON_BIN to set the path /usr/bin/python3.9

After some time, if I call this again it works.
So I have setup a recursive function that on app start, calls await python over and over again (with a pause) until it succeeds, it seems to take about 5 mins to work.
After that all works well.

@extremeheat
Copy link
Owner

Can you provide the stack trace for the error?

@ikb42
Copy link
Author

ikb42 commented Feb 26, 2024

:  at async loadPython (/var/app/current/src/server/utils/library/python/python.js:16:18)
: ... across the bridge ...
": > return _bootstrap._gcd_import(name[level:], package, level)"
:  at import_module (/usr/lib64/python3.9/importlib/__init__.py:127)
:  at _gcd_import (<frozen importlib._bootstrap>:1030)
:  at _find_and_load (<frozen importlib._bootstrap>:1007)
:  at _find_and_load_unlocked (<frozen importlib._bootstrap>:984)
: *** JS *** ModuleNotFoundError: No module named 'pandas']```

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

2 participants