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

python -m -c <cfg> -a: launchpad not found #30

Closed
schuderer opened this issue Jun 28, 2019 · 2 comments
Closed

python -m -c <cfg> -a: launchpad not found #30

schuderer opened this issue Jun 28, 2019 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@schuderer
Copy link
Owner

schuderer commented Jun 28, 2019

When following the intro, at the command:

$ python -m launchpad -c examples/addition_cfg.yml -a

There's a ModuleNotFoundError: No module named 'launchpad'.

After changing around the imports in main.pt, the error is still:

* Serving Flask app "__main__" (lazy loading)
* Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
* Debug mode: on
2019-06-28 16:51:58,476 INFO werkzeug:  * Restarting with stat
Traceback (most recent call last):
  File "C:\dev\code\launchpad\launchpad\__main__.py", line 4, in <module>
    from .model_actions import train_model, retest, predict
ModuleNotFoundError: No module named '__main__.model_actions'; '__main__' is not a package

Can't reproduce on my machine, I think it has something to do with something that is different on Flask debugging server restarting

@schuderer
Copy link
Owner Author

schuderer commented Jun 28, 2019

Workaround:

$ set FLASK_APP=launchpad/wsgi.py:application
$ set LAUNCHPAD_CFG=examples/addition_cfg.yml
$ flask run

Edit: I put this in the README

@schuderer schuderer added bug Something isn't working help wanted Extra attention is needed labels Jul 9, 2019
@schuderer
Copy link
Owner Author

Update: Problem does not occur when using a fresh pipenv environment. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant