globocom / tornado-prometheus

HTTP metrics for a tornado application
MIT License
20 stars 7 forks source link

import breaks with new release of prometheus client #2

Open lhelleckes opened 2 years ago

lhelleckes commented 2 years ago

This morning, I got the following error:

Traceback (most recent call last):
  File "/main/dibdcs/run.py", line 35, in <module>
    import dibdcs
  File "/main/dibdcs/dibdcs/__init__.py", line 69, in <module>
    from . import app
  File "/main/dibdcs/dibdcs/app.py", line 16, in <module>
    import tornado_prometheus
  File "/usr/local/lib/python3.8/site-packages/tornado_prometheus/__init__.py", line 3, in <module>
    from prometheus_client.exposition import choose_encoder
ImportError: cannot import name 'choose_encoder' from 'prometheus_client.exposition' (/usr/local/lib/python3.8/site-packages/prometheus_client/exposition.py)

It seems like the release 0.14.0 of prometheus-client might have caused this.

SDJustus commented 2 years ago

Facing the same issue... Downgrading to 0.13.1 fixes the problem