Closed slrslr closed 2 years ago
Unhandled exception: expected str, bytes or os.PathLike object, not NoneType
Happens when plugins dir missing.
git clone --recursive doesn't work here because master branch has still doesn't has submodule.
first checkout zeronet-enhanced
branch
delete `plugins' dir if exists.
then
git submodule init && git submodule update
$ cd zeronet $ git checkout zeronet-enhanced
M plugins
Switched to branch 'zeronet-enhanced'
Your branch is up to date with 'origin/zeronet-enhanced'.
$ rm -rf plugins
$ git submodule init && git submodule update
Submodule path 'plugins': checked out '9cadd0c69f5af06739cc34cc79dc650053a9b4bd'
$ ./zeronet.py
...
[21:13:06] - Unhandled exception: AttributeError: 'ContentDb' object has no attribute 'getSites' in <gevent>/greenlet.py line 906 > SiteManager.py line 223 > ContentFilterPlugin.py line 43 > SiteManager.py line 205 > Site.py line 221 > ContentManager.py line 55 > PeerDbPlugin.py line 91 > OptionalManager/ContentDbPlugin.py line 60 > ContentDb.py line 85
Traceback (most recent call last):
...
... SAME ERROR REPEATED MANY TIMES...
[21:13:06] - Unhandled exception: 'ContentDb' object has no attribute 'getSites'
...
what to try please?
what is output of git log ?
git log
tried ?
git submodule update
Yes, as shown in the output in this comment above. I have tried again, output is empty. Nothing...
okay found a bug
Open src/Content/ContentDb.py and replace
line 85 : with this self.sites[site.address] = site
line 100: with this del self.sites[site.address]
maintain spacing
report results
I have updated these files as instructed and ran ZN. Result:
[21:38:16] - Unhandled exception: inconsistent use of tabs and spaces in indentation (ContentDb.py, line 85)
i will show you that file content.. in a minute
inconsistent use of tabs and spaces in indentation (ContentDb.py, line 85)
This will happen if you use spaces instead of tabs viceversa only modify text there or wait for chages, i will push in a minute
see the difference dotted lines and arrows in line 100 and 85 they are different
I'm sorry, notepadqq shows "This file is indented with spaces, but your current settings specify to use tabs", on above image the arrows are tabs and dots are spaces... i have tried to paste the code from github repository manually and now shows different error (due to no plugins dir.?) Maybe i should start by removing the zeronet directory and clone again?
wait i will push some changes
git reset --hard 36adb63f6129d1c89a80c801219244a82926d726
then
git pull git submodule update
Any Success ?
yes, that apparently worked and ZN is starting. Looks like it is rebuilding content.db or something, so it can take some time. Then it returned errors, please check here
I will be back with bug fixes
try now
git reset --hard 36adb63
then
git pull git submodule update
follow this
yes, it worked, ZN started without errors :)
I see that the log shows new kind of messages:
[22:29:26] Db#2:ContentDb Loaded ...
[22:29:27] FileServer passive mode is OFF
[22:29:27] FileServer active mode is ON
[22:29:27] FileServer keepAliveThread started
[22:29:27] FileServer wakeupWatcherThread started
[22:29:27] FileServer sitesVerificationThread started
[22:29:27] FileServer reloadTrackerFilesThread started
[22:29:27] FileServer sitesMaintenanceThread(full) started
[22:29:27] FileServer sitesMaintenanceThread(short) started
[22:29:27] FileServer updateSites [#1]: started
[22:29:27] FileServer Server port opened based on configuration ipv4:
...
22:31:33] FileServer running <update> for 1fzncz..csTD
[22:31:34] Site:1SunAW..JN9a CheckModification
ZN works, publishing to 10 peers instead of 5
and seen some errors:
[22:32:58] Ui.UiServer Error 500: UiWSGIHandler error: AttributeError: 'UiServer' object has no attribute 'getSites'
[22:33:13] ConnServer GetFile exception: AttributeError: 'NoneType' object has no attribute 'write' in FileRequest.py line 250 > 46 > Connection.py line 599 > <gevent>/_ssl3.py line 537 > ...
[22:33:14] Site:1HELLo..Ri9d WebSocket handleRequest error: AttributeError: 'UiServer' object has no attribute 'getSites' in UiWebsocket.py line 80 > 238 > UiPluginManagerPlugin.py line 88
{"cmd":"pluginList","params":[],"wrapper_nonce":"....anon...","id":3}
the last error seems to be tied to opening http://127.0.0.1:43110/Plugins/ which does not show any plugins and indeed my ZN is missing plugins directory (was instructed to delete it).
fIXED
after deleting plugins you have to invoke
git submodule init git submodule update
Thank you, i will try, yet on merger site like peeper is error:
Internal error: AttributeError("'UiServer' object has no attribute 'getSites'"): 'UiServer' object has no attribute 'getSites'
UiWebsocket.py line 190 > MergerSitePlugin.py line 159 > 144
on gitcenter i have seen:
[22:59:05] Site:1GitLi..MQ4t WebSocket handleRequest error: AttributeError: 'UiServer' object has no attribute 'getSites' in UiWebsocket.py line 80 > 238 > MergerSitePlugin.py line 118
{"cmd":"mergerSiteList","params":[true],"wrapper_nonce":"...anon...","id":2}
but maybe that is fixed by you already, i will try to git pull, update, but when i try to quit ZN from dashboard/zerohello, it says:
[23:02:33] Site:1HELLo..Ri9d WebSocket handleRequest error: TypeError: FileServerPlugin.stop() got an unexpected keyword argument 'ui_websocket' in UiWebsocket.py line 80 > 216 > 342 > 1204
{"cmd":"response","to":24321,"result":1,"id":1000003}
so i guess i will terminate it
plugin changes are yet to be merged from ze version so this error occured while shutting down.
I have updated from ZNE branch
#!/bin/bash
cd ~/zeronet/||exit
rm -rf plugins
git reset --hard 36adb63
git pull
git submodule init
git submodule update
./zeronet.py --version
and errors was fixed. I have also seen a few of these errors: ...removed and moved to separate issues...
Should i continue reporting these errors in ZNE branch? or move to main branch?
Close this issue and open new issue with errors you have.
I have deleted my orignal zeronet directory (having backup) git clone --recursive
cd into zeronet directory and run:
git checkout zeronet-enhanced
$ python3 zeronet.py
$ git checkout py3-internal
$ python3 zeronet.py --version
..similar error...
$ git checkout master
$ python3 zeronet.py --version
$ git checkout py3-latest
$ python3 zeronet.py --version
So it is weird somehow zeronet enhanced thing does not work. What to try?