Repository navigation
(Py3.10) Error on loading: TypeError: TypeChecker() takes no arguments #293
Copy link
Copy link
Open
Description
Hello,
I upgraded to Fedora 35 (to be released soon, in beta now) to get to Python 3.10 since the bug in Python 3.9 prevents me from using weeslack and weechat-matrix together (wee-slack/wee-slack#812). However, on this newly upgrade system, I'm running into these errors on loading the script:
| "$HOME/Sync/99_private/weechat/python/autoload/matrix.py", line 53, in <module>
09:31:37 | python: stdout/stderr (?): from nio import RemoteProtocolError,
| RemoteTransportError, TransportType
09:31:37 | python: stdout/stderr (?): File "/usr/lib/python3.10/site-packages/nio/__init__.py",
| line 2, in <module>
09:31:37 | python: stdout/stderr (?): from .client import *
09:31:37 | python: stdout/stderr (?): File
| "/usr/lib/python3.10/site-packages/nio/client/__init__.py", line 3, in <module>
09:31:37 | python: stdout/stderr (?): from .base_client import Client, ClientConfig
09:31:37 | python: stdout/stderr (?): File
| "/usr/lib/python3.10/site-packages/nio/client/base_client.py", line 35, in <module>
09:31:37 | python: stdout/stderr (?): from ..crypto import ENCRYPTION_ENABLED
09:31:37 | python: stdout/stderr (?): File
| "/usr/lib/python3.10/site-packages/nio/crypto/__init__.py", line 32, in <module>
09:31:37 | python: stdout/stderr (?): from .key_request import OutgoingKeyRequest
09:31:37 | python: stdout/stderr (?): File
| "/usr/lib/python3.10/site-packages/nio/crypto/key_request.py", line 21, in <module>
09:31:37 | python: stdout/stderr (?): from ..responses import RoomKeyRequestResponse
09:31:37 | python: stdout/stderr (?): File "/usr/lib/python3.10/site-packages/nio/responses.py",
| line 26, in <module>
09:31:37 | python: stdout/stderr (?): from jsonschema.exceptions import SchemaError,
| ValidationError
09:31:37 | python: stdout/stderr (?): File
| "/usr/lib/python3.10/site-packages/jsonschema/__init__.py", line 21, in <module>
09:31:37 | python: stdout/stderr (?): from jsonschema._types import TypeChecker
09:31:37 | python: stdout/stderr (?): File
| "/usr/lib/python3.10/site-packages/jsonschema/_types.py", line 168, in <module>
09:31:37 | python: stdout/stderr (?): draft3_type_checker = TypeChecker(
09:31:37 | python: stdout/stderr (?): TypeError: TypeChecker() takes no arguments
09:31:37 =!= | python: unable to parse file
| "$HOME/Sync/99_private/weechat/python/autoload/matrix.py"
09:31:37 | Connecting to 3 slack teams.
09:31:37 | python scripts loaded: autosort, colorize_nicks, go, notify_send, slack, urlgrab
09:31:37 | perl scripts loaded: highmon
09:31:37 | script: 366 scripts for WeeChat 3.2
09:31:37 | Plugins loaded: alias, buflist, charset, exec, fifo, fset, guile, irc, logger, lua,
| perl, python, relay, ruby, script, spell, tcl, trigger, xfer
I can run the import command just fine in python:
from nio import RemoteProtocolError, RemoteTransportError, TransportType
# all good, no errors here
So maybe it's something related to my upgrade (some pyc or __pycache__ files still referring to older versions or something) but I can't figure out how to go about debugging this. Any hints please?
Here's the system info:
- Fedora 35
- Python 3.10.0rc2
- python3-jsonschema-3.2.0-12.fc35.noarch
- python3-matrix-nio-0.18.6-1.fc35.noarch
- weechat-matrix at 79805d0
- weechat 3.2
$ pwd
$HOME/.weechat/python
$ tree
.
├── autoload
│ ├── autosort.py -> ../autosort.py
│ ├── colorize_nicks.py -> ../colorize_nicks.py
│ ├── go.py -> ../go.py
│ ├── matrix.py -> $HOME/Documents/02_Code/01_others/weechat-matrix/main.py
│ ├── notify_send.py -> ../notify_send.py
│ ├── slack.py -> ../slack.py
│ └── urlgrab.py -> ../urlgrab.py
├── autosort.py
├── colorize_nicks.py
├── go.py
├── matrix -> $HOME/Documents/02_Code/01_others/weechat-matrix/matrix
├── matrix.py -> $HOME/Documents/02_Code/01_others/weechat-matrix/main.py
├── notify_send.py
├── slack.py
└── urlgrab.py
2 directories, 14 files
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
ElDifinitivo commentedon Oct 20, 2021
I've just come across the same issue. Void Linux just recently upgraded to python 3.10.0 and I can't feasibly downgrade back to 3.9. Using a virtualenv doesn't work either due to incompatibilities between versions.
I'm also at a loss of what it could be. I don't think it's due to any
.pycfiles, cleared any cache I could find and it didn't change anything.Versions:
thebeardedpapi commentedon Oct 21, 2021
+1 - same issue as the description. On Fedora 35, with python 3.10.0
I've tried python 3.9, 3.7 and 2.7, they all give me different errors when trying to load matrix.py in weechat.
thatnerdjosh commentedon Nov 20, 2021
I spent many hours today looking into this without much success :(... however I did make a docker image and summary of what I found in case anyone wants an easy way to reproduce it
https://github.com/thatnerdjosh/reproduceable-envs/tree/main/weechat-matrix-293
yalla commentedon Nov 30, 2021
Having the same problem and can't seem to find any way around it. Suggestions?
hroncok commentedon Dec 10, 2021
I believe this is a bug in Python subinterpreters: https://bugs.python.org/issue46034
diabonas commentedon Dec 13, 2021
I confirm that applying
cmp_interned_strings.patchattached to the upstream Python issue bpo-46006 on top of Python 3.10.1 fixes the issue when trying to load the weechat-matrix script.Zapeth commentedon Jan 21, 2022
I no longer get this error with python 3.10.2 (void linux)