Wakatime is not working in a python3.10 version
hyunlee1o opened this issue · 4 comments
hyunlee1o commented
Expected behavior (what should have happened):
Wakatime not failing
Actual behavior (what went wrong):
Throws
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
Environment:
- OS: Debian 12 (testing)
- Platform: amd64
Logs:
Traceback (most recent call last):
File "/home/user/.local/bin/wakatime", line 5, in <module>
from wakatime.__init__ import execute
File "/usr/local/lib/python3.10/dist-packages/wakatime/__init__.py", line 17, in <module>
from .main import execute
File "/usr/local/lib/python3.10/dist-packages/wakatime/main.py", line 32, in <module>
from .api import send_heartbeats, get_time_today
File "/usr/local/lib/python3.10/dist-packages/wakatime/api.py", line 22, in <module>
from .session_cache import SessionCache
File "/usr/local/lib/python3.10/dist-packages/wakatime/session_cache.py", line 26, in <module>
from .packages import requests
File "/usr/local/lib/python3.10/dist-packages/wakatime/packages/requests/__init__.py", line 43, in <module>
import urllib3
File "/usr/local/lib/python3.10/dist-packages/wakatime/packages/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/usr/local/lib/python3.10/dist-packages/wakatime/packages/urllib3/connectionpool.py", line 29, in <module>
from .connection import (
File "/usr/local/lib/python3.10/dist-packages/wakatime/packages/urllib3/connection.py", line 39, in <module>
from .util.ssl_ import (
File "/usr/local/lib/python3.10/dist-packages/wakatime/packages/urllib3/util/__init__.py", line 3, in <module>
from .connection import is_connection_dropped
File "/usr/local/lib/python3.10/dist-packages/wakatime/packages/urllib3/util/connection.py", line 3, in <module>
from .wait import wait_for_read
File "/usr/local/lib/python3.10/dist-packages/wakatime/packages/urllib3/util/wait.py", line 1, in <module>
from .selectors import (
File "/usr/local/lib/python3.10/dist-packages/wakatime/packages/urllib3/util/selectors.py", line 14, in <module>
from collections import namedtuple, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
alanhamlett commented
This repo doesn't depend on Python. What IDE are you using and have you tried upgrading your wakatime plugin to the latest version?
hyunlee1o commented
I downloaded the latest version of the plugin.
I am testing the cli as you see.
Hmmmm
Maybe the python wrapper was confusing me.
JasonGross commented
Presumably this was about https://github.com/wakatime/legacy-python-cli , and installing the cli with python -m pip install wakatime
?
alanhamlett commented
Yes, and most likely running pip uninstall wakatime
, to remove the legacy wakatime-cli, would fix it.