HelloZeroNet / Plugin-PeerMessage

26 stars 10 forks source link

Crypt Errors with ZN revision 4327 #11

Closed krzysztof113 closed 4 years ago

krzysztof113 commented 4 years ago

I got on raspbian: ERROR - Unhandled exception: AttributeError: module 'Crypt.Crypt' has no attribute 'verify' in greenlet.py line 766 > PeerMessage/FileRequestPlugin.py line 29 > PeerMessage/FileRequestPlugin.py line 224 Also ERROR - Unhandled exception: AttributeError: module 'Crypt.Crypt' has no attribute 'privatekeyToAddress' in greenlet.py line 766 > PeerMessage/UiWebsocketPlugin.py line 65 > PeerMessage/UiWebsocketPlugin.py line 284 > PeerMessage/UiWebsocketPlugin.py line 267 Any ideas?

krzysztof113 commented 4 years ago

Actually it has nothing to raspbian. Latest changes in rev 4327, related to multi-threading break this plugin. I don't know on which side needs to be fixed so notifying you both @HelloZeroNet, @imachug

HelloZeroNet commented 4 years ago

You need to change

try:
    from Crypt import Crypt
except ImportError:
    from Crypt import CryptBitcoin as Crypt

To

from Crypt import CryptBitcoin as Crypt

in FileRequestPlugin.py and UiWebsocketPlugin.py

Not sure why is like this, as far I remember there was no function like that in Crypt.Crypt

purplesyringa commented 4 years ago

@HelloZeroNet That's because of my multi-cryptography PR which didn't get fixed. I'll update the plugin soon.

krzysztof113 commented 4 years ago

That would be most helpful. Am right that there is no API (or technique) for checking the plugin version?

purplesyringa commented 4 years ago

There is, serverInfo has such a field.

purplesyringa commented 4 years ago

Huge sorry for such a long fix. I've pushed it and also updated peermessage.zn. Please update your plugins using http://127.0.0.1:43110/Plugins .