Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1 Compatibility #20

Open
williamchange opened this issue Apr 4, 2022 · 4 comments
Open

3.1 Compatibility #20

williamchange opened this issue Apr 4, 2022 · 4 comments
Assignees
Labels
bug compatibility Issue with compatibility

Comments

@williamchange
Copy link
Contributor

in 3.1 python 3.10 was introduced so this seem to have broken the add-on

[Wakatime] [INFO] Initializing Wakatime plugin v2.0.1
[Wakatime] [INFO] Found Wakatime client
[Wakatime] [INFO] project-name in Wakatime: untitled
[Wakatime] [ERROR] Error
[Wakatime] [ERROR] wakatime-core exited with status: 1
[Wakatime] [ERROR] wakatime-core output: Traceback (most recent call last):
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/cli.py", line 24, in <module>
    import wakatime
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/__init__.py", line 17, in <module>
    from .main import execute
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/main.py", line 32, in <module>
    from .api import send_heartbeats, get_time_today
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/api.py", line 22, in <module>
    from .session_cache import SessionCache
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/session_cache.py", line 26, in <module>
    from .packages import requests
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/connectionpool.py", line 29, in <module>
    from .connection import (
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/connection.py", line 39, in <module>
    from .util.ssl_ import (
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/util/__init__.py", line 3, in <module>
    from .connection import is_connection_dropped
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/util/connection.py", line 3, in <module>
    from .wait import wait_for_read
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/util/wait.py", line 1, in <module>
    from .selectors import (
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/util/selectors.py", line 14, in <module>
    from collections import namedtuple, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/Applications/Blender/3.1.1/Blender.app/Contents/Resources/3.1/python/lib/python3.10/collections/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/cli.py", line 31, in <module>
    import wakatime
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/__init__.py", line 17, in <module>
    from .main import execute
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/main.py", line 32, in <module>
    from .api import send_heartbeats, get_time_today
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/api.py", line 22, in <module>
    from .session_cache import SessionCache
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/session_cache.py", line 26, in <module>
    from .packages import requests
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/connectionpool.py", line 29, in <module>
    from .connection import (
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/connection.py", line 39, in <module>
    from .util.ssl_ import (
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/util/__init__.py", line 3, in <module>
    from .connection import is_connection_dropped
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/util/connection.py", line 3, in <module>
    from .wait import wait_for_read
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/util/wait.py", line 1, in <module>
    from .selectors import (
  File "/Users/lmw/.wakatime/wakatime-runtime/legacy-python-cli-master/wakatime/packages/urllib3/util/selectors.py", line 14, in <module>
    from collections import namedtuple, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/Applications/Blender/3.1.1/Blender.app/Contents/Resources/3.1/python/lib/python3.10/collections/__init__.py)

@Rainbrony
Copy link

Hi, I'm encountering the same problem, I found something in colour-science/colour#511
and did the change, now there's no error, but also not working, I'm looking into it now

@Rainbrony
Copy link

Anyone encountering this issue can take a look into my fork's release https://github.com/Rainbrony/WakatimeBlender/releases/tag/v2.0.1-b3.1.0,
It's working good on my machine.

@williamchange
Copy link
Contributor Author

Anyone encountering this issue can take a look into my fork's release https://github.com/Rainbrony/WakatimeBlender/releases/tag/v2.0.1-b3.1.0, It's working good on my machine.

Doesn't seem to work for me on a mac os machine. Can't get the add-on to enable
image

@allista allista self-assigned this May 19, 2022
@allista allista added bug compatibility Issue with compatibility labels May 19, 2022
@allista
Copy link
Owner

allista commented May 19, 2022

Ok, this is sad, but the only way to solve this is to reimplement the wakatime runtime wrapper so that it would download the go runtime compiled for user's system. Unfortunately, the process of deciding which version to download requires a lot of black magic:

https://github.com/wakatime/sublime-wakatime/blob/e5331d3086c6de2014b688553529aa1cf85d22b3/WakaTime.py#L619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compatibility Issue with compatibility
Projects
None yet
Development

No branches or pull requests

3 participants