Docker option no longer works with latest SomethingWithComputers / pixoo library, simulator component seems to be problem
deepcoder opened this issue · 3 comments
Hello,
Thanks for your work on this!
I am trying to build and run the docker container option in your documentation on Ubuntu 20.04 LTS. However SomethingWithComputers latest pixoo library includes a Python TK simulator. This causes the docker container to fail to run. I don't want to use the simulator, just your rest API web functions.
I add :
RUN apt-get update && apt-get install --yes --no-install-recommends python-tk
to the DockerFile and the image builds. However it fails to start with the following:
[2022-10-02 15:21:08 -0700] [7] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 134, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.10/site-packages/gunicorn/util.py", line 359, in import_app
mod = importlib.import_module(module)
File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/app/app.py", line 11, in <module>
from pixoo.pixoo import Channel, Pixoo
File "/usr/app/pixoo/pixoo/__init__.py", line 10, in <module>
from .simulator import Simulator, SimulatorConfig
File "/usr/app/pixoo/pixoo/simulator.py", line 5, in <module>
from pixoo import Palette
ImportError: cannot import name 'Palette' from 'pixoo' (unknown location)
Thanks for your work and help!
Hi,
thanks for the heads-up.
You're on the right track with adding python-tk
.
However, the subsequent issue needs to be fixed in the pixoo
-library.
I already created a PR: SomethingWithComputers/pixoo#6
Once this is merged, I can update things over here.
The Dockerfile now contains an explicit commit-hash of the pixoo-library; making things more stable/robust in the future.
Thank you for your follow and fix! It is working other than the 'COPY app.py .' issue which I posted.