wakatime / legacy-python-cli

Command line interface used by all WakaTime text editor plugins.
https://wakatime.com/
BSD 3-Clause "New" or "Revised" License
1.02k stars 84 forks source link

Error: Python 3.10.0 #264

Open Topology1225 opened 3 years ago

Topology1225 commented 3 years ago

Expected behavior (what should have happened):

satoharu@opt-amp3:~$ wakatime
usage: wakatime [-h] [--entity FILE] [--key API_KEY] [--write]
                [--plugin PLUGIN] [--time time] [--lineno INT]
                [--cursorpos INT] [--entity-type ENTITY_TYPE]
                [--category CATEGORY] [--proxy PROXY] [--no-ssl-verify]
                [--ssl-certs-file FILE] [--project PROJECT]
                [--alternate-project PROJECT] [--language LANGUAGE]
                [--local-file FILE] [--hostname HOSTNAME] [--disable-offline]
                [--hide-file-names] [--hide-project-names]
                [--hide-branch-names] [--exclude PATH]
                [--exclude-unknown-project] [--include PATH]
                [--include-only-with-project-file] [--extra-heartbeats]
                [--log-file FILE] [--api-url URL] [--timeout SECONDS]
                [--sync-offline-activity AMOUNT] [--today] [--config FILE]
                [--config-section SECTION] [--config-read KEY]
                [--config-write KEY VALUE] [--verbose] [--version]
wakatime: error: argument --entity is required

Actual behavior (what went wrong):

satoharu@opt-cps1:~$ wakatime
Traceback (most recent call last):
  File "/home/satoharu/.pyenv/versions/3.10.0/bin/wakatime", line 5, in <module>
    from wakatime.__init__ import execute
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/__init__.py", line 17, in <module>
    from .main import execute
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/main.py", line 32, in <module>
    from .api import send_heartbeats, get_time_today
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/api.py", line 22, in <module>
    from .session_cache import SessionCache
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/session_cache.py", line 26, in <module>
    from .packages import requests
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/packages/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/packages/urllib3/connectionpool.py", line 29, in <module>
    from .connection import (
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/packages/urllib3/connection.py", line 39, in <module>
    from .util.ssl_ import (
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/packages/urllib3/util/__init__.py", line 3, in <module>
    from .connection import is_connection_dropped
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/packages/urllib3/util/connection.py", line 3, in <module>
    from .wait import wait_for_read
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/packages/urllib3/util/wait.py", line 1, in <module>
    from .selectors import (
  File "/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/site-packages/wakatime/packages/urllib3/util/selectors.py", line 14, in <module>
    from collections import namedtuple, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/home/satoharu/.pyenv/versions/3.10.0/lib/python3.10/collections/__init__.py)

Environment:

Logs:

alanhamlett commented 3 years ago

Please use the new Go wakatime-cli since this Python one isn't supported any longer.