jaegertracing / jaeger-client-python

🛑 This library is DEPRECATED!
https://jaegertracing.io/
Apache License 2.0
408 stars 155 forks source link

Getting error ModuleNotFoundError: No module named 'jaeger.ttypes' #272

Closed aroopghoshtarento closed 2 years ago

aroopghoshtarento commented 4 years ago

in python3.7 while running i am getting below error

from jaeger_client import Config
  File "/Users/aroop/python/env/lib/python3.7/site-packages/jaeger_client/__init__.py", line 27, in <module>
    from .config import Config  # noqa
  File "/Users/aroop/python/env/lib/python3.7/site-packages/jaeger_client/config.py", line 26, in <module>
    from .reporter import (
  File "/Users/aroop/python/env/lib/python3.7/site-packages/jaeger_client/reporter.py", line 32, in <module>
    from jaeger_client.thrift_gen.agent import Agent
  File "/Users/aroop/python/env/lib/python3.7/site-packages/jaeger_client/thrift_gen/agent/Agent.py", line 13, in <module>
    from .ttypes import *
  File "/Users/aroop/python/env/lib/python3.7/site-packages/jaeger_client/thrift_gen/agent/ttypes.py", line 12, in <module>
    import jaeger.ttypes
ModuleNotFoundError: No module named 'jaeger.ttypes'
yurishkuro commented 4 years ago

I've seen this long a time ago. Are you running some special form of Python with restrictions that block the following code from taking effect?

https://github.com/jaegertracing/jaeger-client-python/blob/2bd1319e302c033eb3341ee50eaeadc010853e8d/jaeger_client/__init__.py#L19-L23

aroopghoshtarento commented 4 years ago

no. I am using virtualenv and then running the python application inside env with flask framework, in mac os

yurishkuro commented 4 years ago

We are not currently testing with 3.7, so it might be an issue there, or something specific to your setup.

I changed the title to be about 3.7, since we should be supporting it.

yurishkuro commented 4 years ago

Well, ok, py3.7 tests are fine. I suspect it's something about your env. Try to present a reproducer.

aroopghoshtarento commented 4 years ago

below are my env dependency in requirements.txt file

APScheduler==3.6.1 argcomplete==1.8.2 astroid==2.2.5 atomicwrites==1.3.0 attrs==19.1.0 autopep8==1.4.4 backcall==0.1.0 beautifulsoup4==4.5.3 bleach==3.1.0 blis==0.4.1 cachetools==3.1.1 certifi==2019.3.9 chardet==3.0.4 Click==7.0 contextlib2==0.5.5 coverage==4.5.4 cymem==2.0.2 dateparser==0.7.2 decorator==4.4.0 defusedxml==0.6.0 docx2txt==0.6 EbookLib==0.15 elasticsearch==7.0.2 entrypoints==0.3 Flask==1.1.1 Flask-Cors==3.0.8 fpdf==1.7.2 functions==0.7.0 google-api-core==1.11.1 google-auth==1.6.3 google-cloud-core==1.0.1 google-cloud-translate==1.5.0 googleapis-common-protos==1.6.0 GoogleNews==1.2.2 grpcio==1.21.1 idna==2.8 importlib-metadata==0.19 indic-nlp-library==0.6 ipykernel==5.1.2 ipython==7.8.0 ipython-genutils==0.2.0 ipywidgets==7.5.1 isort==4.3.20 itsdangerous==1.1.0 jedi==0.15.1 Jinja2==2.10.1 jsonschema==3.0.2 jupyter==1.0.0 jupyter-client==5.3.4 jupyter-console==6.0.0 jupyter-core==4.6.0 kafka-python==1.4.6 lazy-object-proxy==1.4.1 linecache2==1.0.0 lxml==4.3.3 MarkupSafe==1.1.1 mccabe==0.6.1 mistune==0.8.4 mongoengine==0.18.0 more-itertools==7.2.0 Morfessor==2.0.6 murmurhash==1.0.2 nbconvert==5.6.0 nbformat==4.4.0 newsapi-python==0.2.5 nltk==3.4.2 notebook==6.0.1 numpy==1.16.4 opencv-python==4.1.0.25 packaging==19.1 pandas==0.24.2 pandocfilters==1.4.2 parso==0.5.1 pathlib2==2.3.4 pdf2image==1.5.4 pexpect==4.7.0 pickleshare==0.7.5 Pillow==6.0.0 plac==0.9.6 pluggy==0.12.0 preshed==3.0.2 prometheus-client==0.7.1 prompt-toolkit==2.0.10 protobuf==3.8.0 ptyprocess==0.6.0 public==2019.4.13 py==1.8.0 pyasn1==0.4.5 pyasn1-modules==0.2.5 pycodestyle==2.5.0 Pygments==2.4.2 pymongo==3.8.0 pyparsing==2.4.2 PyPDF2==1.26.0 pyrsistent==0.15.4 pytesseract==0.2.7 pytest==5.1.1 python-dateutil==2.8.0 pytz==2019.1 PyYAML==5.2 pyzmq==18.1.0 qtconsole==4.5.5 redis==3.3.7 regex==2019.8.19 requests==2.22.0 rsa==4.0 schema==0.7.0 schemas==0.7.1 secure-smtplib==0.1.1 Send2Trash==1.5.0 six==1.10.0 spacy==2.2.1 srsly==0.1.0 terminado==0.8.2 testpath==0.4.2 thinc==7.1.1 tornado==6.0.3 tqdm==4.36.1 traceback2==1.4.0 traitlets==4.3.3 typed-ast==1.3.5 tzlocal==2.0.0 unittest2==1.1.0 urllib3==1.25.3 values==2019.4.13 wasabi==0.2.2 wcwidth==0.1.7 webencodings==0.5.1 Werkzeug==0.15.4 widgetsnbextension==3.5.1 wrapt==1.11.1 xmltodict==0.12.0 zipp==0.5.2

nerusnayleinad commented 4 years ago

I'm facing the same issue. has anyone resolved it?

maxisme commented 4 years ago

+1

maxisme commented 4 years ago

Upgraded to python 3.8 from 3.7 now it works!

someshbhalsing commented 4 years ago

+1

kaxarov commented 3 years ago

Try with python3 manage.py install -r requirements.txt