-
Notifications
You must be signed in to change notification settings - Fork 123
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
can't load matrix.py #357
Comments
I have similar error and cannot load matrix.py. This is being tracked in My error is:
|
Getting the same traceback on a mostly fresh install on Ubuntu 22.04 in WSL (Python 3.10.12) (Same error on Ubuntu 24.04 LTS/Python 3.12.3) |
I am also having this problem – does anyone know how I would find out whether I am
? Because of the few Python scripts in the list of loaded scripts, none are particularly networky or anything beyond things like topicdiff, auto_away, etc. Oooh wait, I'm dumb. I get a separate error when I first load the plugin, then when I reload it I get this error because it conflicts with itself – or something? |
Hi @poljar So is this basically the question if Py03 starts supporting openssl or they don't? Or as well, if pyOpenSSL starts including another package than Py03? I'm just trying to understand the changes that were made and who made them upstream.. Or I guess if you support and include a different openssl package then pyOpenSSL in your code? Thanks for any insight.. On the README for pyOpenSSL it says |
@LorenzoBianconi waiting for @poljar... |
That won't help. pyOpenSSL depends on pyca/cryptography, and pyca/cryptography is the one depending on PyO3, not pyOpenSSL directly. So switching to pyca/cryptography won't change anything in regards to this issue. |
@trygveaa how do you suggest to fix it in this case? |
As far as I can see pyOpenSSL is only used to print certificate info, so could just avoid printing that if using a version that has this problem. However, I see that matrix-nio depends on jsonschema which transitively depends on another package that is also using PyO3 (rpds-py). This is used for schema validation of responses and some other data. So would have to either replace that with something else or drop validation. |
To the best of my understanding, there are three ways to progress from here:
As of now, neither looks particularly appealing. |
The cryptography package (which pyOpenSSL depends on) doesn't support being loaded in multiple sub interpreters from version 41.0.0. Doing it in previous versions seemed to work, but could apparenly cause soundness issues, so it errors out from version 41.0.0. Note that this isn't a change in the cryptography package, but in pyo3 from version 0.17.0, which cryptography uses. This causes the script to fail when reloading it. However, since pyOpenSSL is only used to print certificate info, wrap it in a try and skip printing info instead of crashing if pyOpenSSL can't be imported. There is another issue with a dependency of matrix-nio using pyo3 (rpds-py via jsonschema), but this at least helps with part of the problem. See poljar#357 for more details.
Yeah, that's a good summary @zer0def. I see two other options as well:
As for the issue with pyOpenSSL, I opened a PR now to print certificate info conditionally as a workaround to this part of the problem: #367 |
Just for clarity, this is the unavoidable output users are likely to bump into, even if they work around pyca/cryptography's complaints stemming from pyOpenSSL's usage:
|
The cryptography package (which pyOpenSSL depends on) doesn't support being loaded in multiple sub interpreters from version 41.0.0. Doing it in previous versions seemed to work, but could apparenly cause soundness issues, so it errors out from version 41.0.0. Note that this isn't a change in the cryptography package, but in pyo3 from version 0.17.0, which cryptography uses. This causes the script to fail when reloading it, or if you load it after another script with the same dependency. However, since pyOpenSSL is only used to print certificate info, wrap it in a try and skip printing info instead of crashing if pyOpenSSL can't be imported. There is another issue with a dependency of matrix-nio using pyo3 (rpds-py via jsonschema), but this at least helps with part of the problem. See poljar#357 for more details.
Confirming that #367 and rolling back to |
Can users do this workflow if they use |
Yes, you can use a venv for the dependencies of weechat-matrix. If it's a directory named |
the rust plugin does not work with latest weechat packaged in fedora |
Complete the installation and run /script load matrix.py, I got the following error. What should I do?
The text was updated successfully, but these errors were encountered: