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
AttributeError: '_RSAPrivateKey' object has no attribute 'sign' (Morango) #2805
Comments
I updated the description as I was debugging this. It seems that there could be two separate issues:
|
Updated Morango's test matrix to include different versions of Cryptography: learningequality/morango#32 |
Debugging suggests that it's not the way in which we append
Rather, I think it's because this isn't done until line 150 in These are of interest because they all load before the call to try:
from .build_config.default_settings import settings_path
except ImportError:
settings_path = "kolibri.deployment.default.settings.base"
# ...
from django.core.management import call_command # noqa
# ...
from kolibri.core.deviceadmin.utils import IncompatibleDatabase # noqa
# ....
from . import server # noqa
from .system import become_daemon # noqa
# .... |
@lyw07 I will try to change where |
No I don't think it was added at that place due to any reason. It was probably because I didn't know where to put it. Please feel free to change it! Thank you! |
@lyw07 to reproduce it, you need to install a wrong, system-wide cryptography, for instance |
@benjaoming Thank you! I've reproduced the error on a debian VM and been waiting the buildkite's build. I'll update the status once I finish testing! |
@lyw07 I triggered a rebuild just 2 minutes ago :) |
Fixed in #2808 |
This is still an issue because The path on Ubuntu 16.04 64-bit resolves to (in my current .deb test build) via
This path is empty :/ So the system version is picked once again, and Morango doesn't support it. See: learningequality/morango#37 |
Here's a full traceback btw.. reproduced in 0.7.1-beta1 source dist built with Python 3:
@lyw07 I think we did right in choosing to remove these 64 bit + MacOS versions of cryptography to significantly reduce the size of the source dist -- but it makes the issue all the more evident :) |
Duplicate: #3079 |
@benjaoming Sorry for not noticing the error while I was testing! I was testing the |
Since we are using only Python 3 for the Debian installer, I think it might be enough to only put back Python 3's Linux 64-bit cryptography packages back? Even if Debian users use the whl file and Python 2 to run Kolibri instead of the Debian installer, they will not get the error, with the premise that they don't have |
@lyw07 I think my best argument for the inclusion of an accelerated version of cryptography would be Raspberry Pi platforms, but they're armf and not released on PyPi - as mentioned earlier, those builds are available in the Raspbian repos, so the true solution should come at a later stage, where we pin a hard dependency on python-cryptography in our debian package. |
@lyw07 I think it's okay to leave 64 bit out for now... not because it wouldn't be easier to just add it back.. but more because it would be a kind of symptom treatment of a fundamental issue, namely that Morango breaks when there's a cryptography version on the system that cannot sign data, as with 1.2.3. |
@benjaoming thank you for the clarification! |
Fixed in #3138 and learningequality/morango#46 |
Observed behavior
Just built 0.7.0-beta5 and running it from the Debian, the setup process fails after completing the final step:
Expected behavior
Correctly create a key and quit.
User-facing consequences
Release blocker - or at least getting it explained is :)
Errors and logs
The C extensions are built....
Steps to reproduce
I can release/upload the .deb installer with the error if necessary...
Context
The text was updated successfully, but these errors were encountered: