mweinelt / kea-exporter

Export Kea Metrics in the Prometheus Exposition Format
MIT License
34 stars 17 forks source link

Python version #8

Closed mathiasAichinger closed 5 years ago

mathiasAichinger commented 5 years ago

Hi, I'm having various problems getting the kea-exporter running. Which Python version are you using?

mathiasAichinger commented 5 years ago

With my default python 2.7 I had problems with the bytes method and I got str() takes at most 1 argument (2 given)

With python 3.5 I always got the following error:

➜  ~ kea-exporter /usr/local/etc/kea/kea-dhcp4.conf
Traceback (most recent call last):
  File "/home/user/.pyenv/versions/3.5.0/bin/kea-exporter", line 11, in <module>
    sys.exit(cli())
TypeError: 'module' object is not callable

I solved it by changing the import in /home/user/.pyenv/versions/3.5.0/bin/kea-exporter from from kea_exporter import cli to from kea_exporter.cli import cli

mweinelt commented 5 years ago

Any python3 is probably just fine.

The issue you mentioned I fixed in https://github.com/mweinelt/kea-exporter/commit/25f9a0e1280cfe73caa88c53b37578b15aa9e41f.

Must've forgotten to bump version however, will take care of that later today.

mweinelt commented 5 years ago

Version bumped and uploaded to pypi. I hope that solves the issue mentioned.

mathiasAichinger commented 5 years ago

Fixed. thx 👍