[Python] Python script running via shell but not working via supervisord

Discussão em 'Python' iniciado por Stack, Abril 23, 2025.

  1. Stack

    Stack Membro Participativo

    The error that I'm facing is:

    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'


    Which I thought was resolved by following the instructions in this stackoverflow answer:

    sudo apt-get --reinstall install python-pyasn1 python-pyasn1-modules
    pip3 install --upgrade google-auth-oauthlib


    When I run my program via supervisorctl, sudo supervisorctl restart at_ussd I get the error above. However when I run my program via shell sudo python3 at_ussd.py, the program runs smoothly.

    Please help me resolve this so that I can continue using supervisor for management!

    Continue reading...

Compartilhe esta Página