barrycarey / Plex-Data-Collector-For-InfluxDB

Collects data about your Plex server and sends it to InfluxDB
165 stars 41 forks source link

ImportError: No module named request #16

Closed Dekalox closed 6 years ago

Dekalox commented 6 years ago

Hi, when running the script i'm getting the following:

pi@raspberrypi:~/plexinfluxdb $ python plexInfluxdbCollector.py Traceback (most recent call last): File "plexInfluxdbCollector.py", line 1, in from urllib.request import Request, urlopen ImportError: No module named request

I did run pip install request and sudo apt-get install python-requests which gets it installed along with some other packages, but the error persists.

jinglyjangles commented 6 years ago

Had the same issue in 3.4, ran 3.6.5 in a virtual environment (i.e. virutalenv -p python3.6) and was finally able to get it working. (this solved another dependency issue i was also seeing) Seems that python 2.7 and 3.4 are each missing different dependencies, but 3.6.5 had them both.

(Side note; I tried brute forcing my way through on 2.7 by replacing the defunct urlib.request with no luck. Seems that 3.6.5 has a way to work around that. )

barrycarey commented 6 years ago

I've pushed an update that is now using the requests library for all HTTP calls. This shouldn't be an issue any longer