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 when starting - name 'p' is not defined (0.5.0-dev) #30

Closed
Anaerin opened this issue Feb 15, 2021 · 2 comments
Closed

Error when starting - name 'p' is not defined (0.5.0-dev) #30

Anaerin opened this issue Feb 15, 2021 · 2 comments

Comments

@Anaerin
Copy link

Anaerin commented Feb 15, 2021

Attempting to use P4S in docker, taking the following steps:

$ git clone -b 0.5.0-dev https://github.com/faulander/P4S.git
$ cd P4S/
$ ./setup.sh
$ docker-compose up

And after everything's built and deployed, the web_1 container reports:

web_1  | [2021-02-15 16:19:40 +0000] [8] [ERROR] Exception in worker process
web_1  | Traceback (most recent call last):
web_1  |   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
web_1  |     worker.init_process()
web_1  |   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
web_1  |     self.load_wsgi()
web_1  |   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
web_1  |     self.wsgi = self.app.wsgi()
web_1  |   File "/usr/local/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
web_1  |     self.callable = self.load()
web_1  |   File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
web_1  |     return self.load_wsgiapp()
web_1  |   File "/usr/local/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
web_1  |     return util.import_app(self.app_uri)
web_1  |   File "/usr/local/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
web_1  |     mod = importlib.import_module(module)
web_1  |   File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
web_1  |     return _bootstrap._gcd_import(name[level:], package, level)
web_1  |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
web_1  |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
web_1  |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
web_1  |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
web_1  |   File "<frozen importlib._bootstrap_external>", line 783, in exec_module
web_1  |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
web_1  |   File "/home/app/web/new_shows/wsgi.py", line 16, in <module>
web_1  |     application = get_wsgi_application()
web_1  |   File "/usr/local/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
web_1  |     django.setup(set_prefix=False)
web_1  |   File "/usr/local/lib/python3.8/site-packages/django/__init__.py", line 19, in setup
web_1  |     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
web_1  |   File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 76, in __getattr__
web_1  |     self._setup(name)
web_1  |   File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 63, in _setup
web_1  |     self._wrapped = Settings(settings_module)
web_1  |   File "/usr/local/lib/python3.8/site-packages/django/conf/__init__.py", line 142, in __init__
web_1  |     mod = importlib.import_module(self.SETTINGS_MODULE)
web_1  |   File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
web_1  |     return _bootstrap._gcd_import(name[level:], package, level)
web_1  |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
web_1  |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
web_1  |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
web_1  |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
web_1  |   File "<frozen importlib._bootstrap_external>", line 783, in exec_module
web_1  |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
web_1  |   File "/home/app/web/new_shows/settings.py", line 30, in <module>
web_1  |     p]
web_1  | NameError: name 'p' is not defined
web_1  | [2021-02-15 16:19:40 +0000] [8] [INFO] Worker exiting (pid: 8)
web_1  | [2021-02-15 16:19:40 +0000] [1] [INFO] Shutting down: Master
web_1  | [2021-02-15 16:19:40 +0000] [1] [INFO] Reason: Worker failed to boot.
p4s_web_1 exited with code 3
@Anaerin
Copy link
Author

Anaerin commented Feb 15, 2021

A simple edit (removing the p on line 30 of settings.py) solves this, incidentally. Now I have other issues, but that solves this one.

@faulander
Copy link
Owner

Don't use the DEV-Version, this is my own development version and it's not ready to be used in production.

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