c0deaddict / import-garmin-connect

Import Garmin Connect data into InfluxDB
MIT License
2 stars 0 forks source link

ImportError: attempted relative import with no known parent package #1

Closed mpenn0 closed 3 years ago

mpenn0 commented 3 years ago

Hello,

If I tried to start: python3.8 import_garmin_connect --user ... --password ... --profile ...

I get the error: Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "import_garmin_connect/__main__.py", line 9, in <module> from . import garmin ImportError: attempted relative import with no known parent package Do you have an idea? Thanks

c0deaddict commented 3 years ago

You should invoke it as a Python module, like so:

python -m import_garmin_connect --user user@domain.com --password "xxx" --profile user --influx-host 127.0.0.1 --date 2021-02-21 --days 8

Hope that works! Let me know if it doesn't.

mpenn0 commented 3 years ago

Yeah, it works now! I am now trying to select the correct data, since I have entered much less in Garmin than you. At the moment only the values of a weighing scale, with body fat, muscle mass and so on.

Edit: I found it in main.py