Der Fehler, ich bin vor ist:Python Skript über Shell läuft, aber nicht arbeiten über supervisord
File "/usr/local/lib/python3.5/dist-packages/oauth2client/crypt.py", line 23, in <module>
from oauth2client import _pure_python_crypt
File "/usr/local/lib/python3.5/dist-packages/oauth2client/_pure_python_crypt.py", line 24, in <module>
from pyasn1_modules.rfc2459 import Certificate
File "/usr/local/lib/python3.5/dist-packages/pyasn1_modules/rfc2459.py", line 20, in <module>
from pyasn1.type import opentype
ImportError: cannot import name 'opentype'
Was ich dachte indem Sie den Anweisungen in this stackoverflow answer aufgelöst wurde:
sudo apt-get --reinstall install python-pyasn1 python-pyasn1-modules
pip3 install --upgrade google-auth-oauthlib
Wenn ich mein Programm über supervisorctl, sudo supervisorctl restart at_ussd
, starte ich den Fehler oben. Allerdings, wenn ich mein Programm über Shell sudo python3 at_ussd.py
ausführen, läuft das Programm reibungslos.
Bitte helfen Sie mir, dies zu lösen, damit ich weiterhin Supervisor für das Management verwenden kann!