lephisto / tesla-apiscraper

API Scraper for pulling Vehicle Statistics from the Tesla Owner API into an InfluxDB + Grafana Dashboards
GNU Lesser General Public License v3.0
365 stars 102 forks source link

Module not found error - Python issue? #65

Closed bahree closed 5 years ago

bahree commented 5 years ago

Hi, I just finished installing and configuring this on a raspberry pi (fresh install) and went through the instructions and got everything deployed including Influx and Grafana.

However when I try and run the apiscraper.py, I get the I get the following error. Any idea on what is wrong? I do have Python3 installed.

pi@pi-server:~/tesla-apiscraper $ python3 ./apiscraper.py
Traceback (most recent call last):
  File "./apiscraper.py", line 34, in <module>
    from config import *
ModuleNotFoundError: No module named 'config'

The only thing I can think this can be related to is when I was installing the elevation calculation dependency, I got a couple of warning, outlined below.


pi@pi-server:~/srtm.py $ python3 ./setup.py install --user
/usr/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'include_package_data'
  warnings.warn(msg)
/usr/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
changing mode of /home/pi/.local/bin/gpxelevations to 755
running install_egg_info
Removing /home/pi/.local/lib/python3.7/site-packages/SRTM.py-0.3.4.egg-info
Writing /home/pi/.local/lib/python3.7/site-packages/SRTM.py-0.3.4.egg-info

Thanks in advance.

jpenninkhof commented 5 years ago

Did you create a configuration file? The readme expects you to do this:

cp config.py.dist config.py

And change the config.py with your values of course.

bahree commented 5 years ago

Yes I did - it took me a while, but it turns out for some weird reason my npm was borked and had to clean it up and manually build from code (don't know why), Anyways everything is sorted ans installed, and i did copy the config file.

However, now when I run it I get the following:

pi@pi-server:~/tesla-apiscraper $ python3 ./apiscraper.py
Failed to initialize Owner API

And the log file (apiscraper.log) is empty - any ideas on where I can see on what is causing this? Also is the car index in the config file zero based?

Thanks.

lephisto commented 5 years ago

Car Index 0 is the first car in that Tesla account.