ZeroNetX / ZeroNet

ZeroNetX - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.dev
Other
215 stars 32 forks source link

Cannot import name 'Ed25519' + No module named 'merkletools' & 'base58' #119

Closed slrslr closed 2 years ago

slrslr commented 2 years ago

Hello, i have cloned from py3-internal branch just now and ZN returned:

$ ../zeronet.py --version

- Starting ZeroNet...
PluginManager Plugin AnnounceZero load error: ImportError: cannot import name 'Ed25519' from 'lib' (/home/user/zeronet/src/lib/__init__.py) in PluginManager.py line 138 > AnnounceZero/__init__.py line 1 > AnnounceZeroPlugin.py line 6

PluginManager Plugin Bigfile load error: ModuleNotFoundError: No module named 'merkletools' in PluginManager.py line 138 > Bigfile/__init__.py line 1 > BigfilePlugin.py line 20

PluginManager Plugin CryptMessage load error: ModuleNotFoundError: No module named 'base58' in PluginManager.py line 138 > CryptMessage/__init__.py line 1 > CryptMessagePlugin.py line 7 > CryptBitcoin.py line 14 > lib/sslcrypto/__init__.py line 4 > lib/sslcrypto/openssl/__init__.py line 1 > lib/sslcrypto/openssl/aes.py line 4 > lib/sslcrypto/fallback/__init__.py line 2 > lib/sslcrypto/fallback/ecc.py line 4 > lib/sslcrypto/_ecc.py line 4

PluginManager Plugin ZeronameElectrumNMC load error: ModuleNotFoundError: No module named 'ZeronameElectrumNMC' in 
PluginManager.py line 138

ZeroNet 0.7.6-internal 2 r4560

$ python --version Python 3.10.1

Then i ran $ cd path/to/zeronet && pip install -r requirements.txt with this output ("Successfully installed base58-2.1.1 coincurve-16.0.0 gevent-ws-2.1.0 maxminddb-2.2.0 merkletools-1.0.3 pysha3-1.0.2")

Only error that remains is:

PluginManager Plugin AnnounceZero load error: ImportError: cannot import name 'Ed25519' from 'lib' (/home/user/zeronet/src/lib/__init__.py) in PluginManager.py line 138 > AnnounceZero/__init__.py line 1 > AnnounceZeroPlugin.py line 6
- Libsecpk256k1 loaded: Lib in 0.042s

What does it mean, how this can be fixed? Should i be running "pip install -r requirements.txt" each time i clone the py3-internal branch? Thank You

rex4539 commented 2 years ago

The plugins are now a separate repo so I suggest you clone the Zeronet repo with --recursive flag.

Or otherwise enter git submodule init && git submodule update.

slrslr commented 2 years ago

Thanks for a good suggestion. I think that i am using latest plugins version since i am also cloning plugins directory manually. https://raw.githubusercontent.com/ZeroNetX/ZeroNet-Plugins/master/AnnounceZero/AnnounceZeroPlugin.py match what i have in /home/user/apps/zeronet/plugins/AnnounceZero/AnnounceZeroPlugin.py - yet mentioned Ed25519 error still appears...

I have tried that --recursive flag into following update commands

for updating i am now using:

cd "$dstdir"||exit;git --branch "$branch" remote add origin "$giturl" 2>/dev/null;git submodule update --init --recursive;git pull origin master --branch "$branch" --recursive 2>/dev/null||git pull origin main --branch "$branch" --recursive 2>/dev/null
cd "$dstdir2"||exit;git remote add origin "$giturl2" 2>/dev/null;git submodule update --init;git pull origin master 2>/dev/null||git pull origin main 2>/dev/null

(dstdir=zeronet;dstdir2=zeronet/plugins)

and on each run it returns:

Submodule path 'plugins': checked out '5c22d54984363d425d9f7b6aabbf1a871e7e60a1'
Updating 5c22d54..b59467e
Fast-forward
 .gitmodules                                    | 9 +++++++++
 AnnounceZero/AnnounceZeroPlugin.py             | 6 +++---
 NameYo                                         | 1 +
 PeerMessage                                    | 1 +
 disabled-BackgroundProcessing                  | 1 +
 disabled-Bootstrapper/BootstrapperPlugin.py    | 6 +++---
 disabled-Bootstrapper/Test/TestBootstrapper.py | 6 +++---
 7 files changed, 21 insertions(+), 9 deletions(-)
 create mode 100644 .gitmodules
 create mode 160000 NameYo
 create mode 160000 PeerMessage
 create mode 160000 disabled-BackgroundProcessing

🤔

Yours suggested command has this output:

$ git submodule init && git submodule update
Submodule path 'plugins': checked out '5c22d54984363d425d9f7b6aabbf1a871e7e60a1'
canewsin commented 2 years ago

@slrslr try now, pushed some changes to internal branch

canewsin commented 2 years ago

Fixed in v0.7.6