tcgoetz / GarminDB

Download and parse data from Garmin Connect or a Garmin watch, FitBit CSV, and MS Health CSV files into and analyze data in Sqlite serverless databases with Jupyter notebooks.
GNU General Public License v2.0
1.18k stars 142 forks source link

Cannot use garmindb_cli.py #185

Closed nsedler closed 9 months ago

nsedler commented 1 year ago

I was using garmindb successfully for months and now suddenly I cannot use any garmindb_cli.py command with getting the following error:

garmindb_cli.py --all --download --import --analyze                                                               [10:30:16]
Traceback (most recent call last):
  File "/home/reldesn/.local/bin/garmindb_cli.py", line 22, in <module>
    from garmindb import python_version_check, log_version, format_version
  File "/home/reldesn/.local/lib/python3.10/site-packages/garmindb/__init__.py", line 29, in <module>
    from .maps import Map, ActivityMap
  File "/home/reldesn/.local/lib/python3.10/site-packages/garmindb/maps.py", line 63, in <module>
    green_pin = ColoredPin('green')
  File "/home/reldesn/.local/lib/python3.10/site-packages/garmindb/maps.py", line 53, in __init__
    super().__init__(
  File "/home/reldesn/.local/lib/python3.10/site-packages/ipyleaflet/leaflet.py", line 158, in __init__
    super(Layer, self).__init__(**kwargs)
  File "/home/reldesn/.local/lib/python3.10/site-packages/ipywidgets/widgets/widget.py", line 504, in __init__
    self.open()
  File "/home/reldesn/.local/lib/python3.10/site-packages/ipywidgets/widgets/widget.py", line 535, in open
    self.comm = create_comm(**args)
  File "/home/reldesn/.local/lib/python3.10/site-packages/comm/__init__.py", line 27, in _create_comm
    raise NotImplementedError("Cannot ")
NotImplementedError: Cannot

My config file is setup correct and has never changed. I tried pip uninstalling and reinstalling but no luck.

alexis-m commented 1 year ago

As a side note, it's unfortunate that the cli loads graphical libraries...

Is it possible that some packages got updated? I run garming in a venv, and it is still working. Here is what I have from pip list:

Package                  Version
------------------------ --------
anyio                    3.6.2
argon2-cffi              21.3.0
argon2-cffi-bindings     21.2.0
arrow                    1.2.3
asttokens                2.2.1
attrs                    23.1.0
backcall                 0.2.0
beautifulsoup4           4.12.2
bleach                   6.0.0
branca                   0.6.0
cached-property          1.5.2
certifi                  2023.5.7
cffi                     1.15.1
charset-normalizer       3.1.0
cloudscraper             1.2.71
colorama                 0.4.6
comm                     0.1.3
contourpy                1.0.7
cycler                   0.11.0
debugpy                  1.6.7
decorator                5.1.1
defusedxml               0.7.1
executing                1.2.0
fastjsonschema           2.16.3
fitfile                  1.1.3
fonttools                4.39.4
fqdn                     1.5.1
garmindb                 3.3.0
greenlet                 2.0.2
idbutils                 1.0.7
idna                     3.4
ipykernel                6.21.3
ipyleaflet               0.17.2
ipython                  8.13.2
ipython-genutils         0.2.0
ipywidgets               8.0.6
isoduration              20.11.0
jedi                     0.18.2
Jinja2                   3.1.2
jsonpointer              2.3
jsonschema               4.17.3
jupyter                  1.0.0
jupyter_client           8.2.0
jupyter-console          6.6.3
jupyter_core             5.3.0
jupyter-events           0.6.3
jupyter_server           2.5.0
jupyter_server_terminals 0.4.4
jupyterlab-pygments      0.2.2
jupyterlab-widgets       3.0.7
kiwisolver               1.4.4
MarkupSafe               2.1.2
matplotlib               3.7.1
matplotlib-inline        0.1.6
mistune                  2.0.5
nbclassic                1.0.0
nbclient                 0.7.4
nbconvert                7.4.0
nbformat                 5.8.0
nest-asyncio             1.5.6
notebook                 6.5.4
notebook_shim            0.2.3
numpy                    1.24.3
packaging                23.1
pandas                   2.0.1
pandocfilters            1.5.0
parso                    0.8.3
pickleshare              0.7.5
Pillow                   9.5.0
pip                      22.0.4
platformdirs             3.5.1
prometheus-client        0.16.0
prompt-toolkit           3.0.38
psutil                   5.9.5
pure-eval                0.2.2
pycparser                2.21
Pygments                 2.15.1
pyparsing                3.0.9
pyrsistent               0.19.3
python-dateutil          2.8.2
python-json-logger       2.0.7
pytz                     2023.3
pywin32                  306
pywinpty                 2.0.10
PyYAML                   6.0
pyzmq                    25.0.2
qtconsole                5.4.3
QtPy                     2.3.1
requests                 2.28.2
requests-toolbelt        1.0.0
rfc3339-validator        0.1.4
rfc3986-validator        0.1.1
Send2Trash               1.8.2
setuptools               58.1.0
six                      1.16.0
snakemd                  2.1.0
sniffio                  1.3.0
soupsieve                2.4.1
SQLAlchemy               2.0.13
stack-data               0.6.2
tcxfile                  1.0.4
terminado                0.17.1
tinycss2                 1.2.1
tornado                  6.3.1
tqdm                     4.64.1
traitlets                5.9.0
traittypes               0.2.1
typing_extensions        4.5.0
tzdata                   2023.3
uri-template             1.2.0
urllib3                  1.26.15
wcwidth                  0.2.6
webcolors                1.13
webencodings             0.5.1
websocket-client         1.5.1
widgetsnbextension       4.0.7
xyzservices              2023.2.0
tcgoetz commented 1 year ago

cli loads graphics libs because it generates graphs and maps as static images.

Probably a package update. I'll see if I can reproduce this.

tcgoetz commented 1 year ago

I have a different versions of the graphics packages:

ipyleaflet 0.17.3 ipywidgets 8.1.0 comm 0.1.4

tcgoetz commented 1 year ago

Can you reproduce this issue with https://github.com/tcgoetz/GarminDB/releases/tag/v3.5.0

tcgoetz commented 1 year ago

Please retry with 3.5.1. Map support is no longer in the main package. Dependency should no longer be an issue.