Open yurivict opened 7 years ago
I have lots of these. I believe it prevents me to download some pages like ZeroMail (5 file update failed) and GIFTime (2 file update failed).
[12:44:33] Site:1TaLkF..jipT data/users/1NtsBLNSXtBuFg52FbWGD9gQJJaXKQKG5F/content.json: verify sign error: ValueError: No JSON object could be decoded in ContentManager.py line 804 > __init__.py line 291 > __init__.py line 339 > decoder.py line 364 > decoder.py line 382
[12:44:46] Site:1TaLkF..jipT data/users/16bxMyoL49mWYhcZKBYVBT5zEFW9SQpiao/content.json: verify sign error: ValueError: Extra data: line 1 column 2 - line 19 column 2 (char 1 - 718) in ContentManager.py line 804 > __init__.py line 291 > __init__.py line 339 > decoder.py line 367
[12:45:16] Site:1TaLkF..jipT data/users/1MDVhLhAhbw5NchZiHCZ9aooU1KtqZdQY5/content.json: verify sign error: ValueError: No JSON object could be decoded in ContentManager.py line 804 > __init__.py line 291 > __init__.py line 339 > decoder.py line 364 > decoder.py line 382
[12:45:17] Site:1TaLkF..jipT data/users/1NtUxUGV3r3htk4rMM172YMkBscb1tekFF/content.json: verify sign error: ValueError: No JSON object could be decoded in ContentManager.py line 804 > __init__.py line 291 > __init__.py line 339 > decoder.py line 364 > decoder.py line 382
Info:
[13:01:32] - OpenSSL loaded, version: 0100020CF
[13:01:32] - Version: 0.6.0 r3106, Python 2.7.12 (default, Sep 13 2017, 22:06:49)
[GCC 4.9.3], Gevent: 1.2.1
[13:01:32] - Creating FileServer....
[13:01:32] TorManager Connecting to Tor Controller 127.0.0.1:9051
[13:01:32] - Creating UiServer....
[13:01:32] - Removing old SSL certs...
[13:01:32] - Starting servers....
[13:01:32] Ui.UiServer --------------------------------------
[13:01:32] Ui.UiServer Web interface: http://127.0.0.1:43110/
[13:01:32] Ui.UiServer --------------------------------------
This bug is still present.
It just says "[15:14:29] - Unhandled exception: No JSON object could be decoded". How can I find a bad json?
Can you please paste the full error? There should be more information after that line (or in log/error.log)
[15:30:49] SiteManager Loading sites...
[15:30:49] - Unhandled exception: No JSON object could be decoded
Traceback (most recent call last):
File "/usr/local/share/zeronet/zeronet.py", line 19, in main
main.start()
File "/usr/local/share/zeronet/src/main.py", line 509, in start
actions.call(config.action, action_kwargs)
File "/usr/local/share/zeronet/src/main.py", line 157, in call
func(**kwargs)
File "/usr/local/share/zeronet/src/main.py", line 167, in main
ui_server = UiServer()
File "/usr/local/share/zeronet/src/Ui/UiServer.py", line 75, in __init__
self.sites = SiteManager.site_manager.list()
File "/usr/local/share/zeronet/src/Site/SiteManager.py", line 170, in list
self.load(startup=True)
File "plugins/Zeroname/SiteManagerPlugin.py", line 20, in load
super(SiteManagerPlugin, self).load(*args, **kwargs)
File "plugins/MergerSite/MergerSitePlugin.py", line 377, in load
super(SiteManagerPlugin, self).load(*args, **kwags)
File "plugins/Chart/ChartPlugin.py", line 21, in load
back = super(SiteManagerPlugin, self).load(*args, **kwargs)
File "/usr/local/share/zeronet/src/Site/SiteManager.py", line 35, in load
for address, settings in json.load(open("%s/sites.json" % config.data_dir)).iteritems():
File "/usr/local/lib/python2.7/json/__init__.py", line 291, in load
**kw)
File "/usr/local/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
[15:30:49] - Unhandled exception
None
- Starting ZeroNet...
Traceback (most recent call last):
File "/usr/local/share/zeronet/zeronet.py", line 91, in <module>
main()
File "/usr/local/share/zeronet/zeronet.py", line 64, in main
traceback.print_exc(file=open(config.log_dir + "/error.log", "a"))
AttributeError: 'Config' object has no attribute 'log_dir'
[15:30:49] SiteManager Save skipped: No sites found
The problem is with data/sites.json file, please check the content and there could be sites.json-old as backup
sites.json
is empty. There is sites.json-tmpnew
which is valid.
Rename sites.json-tmpnew
to sites.json
. This probably happened because ZeroNet didn't shutdown gracefully.
AFAIK ZeroNet uses a feature called atomicWrite, so I'm not sure why sites.json is empty. (@HelloZeroNet correct me if I'm wrong)
Yes it should not happen, here is the function: https://github.com/HelloZeroNet/ZeroNet/blob/master/src/util/helper.py#L15
So it works this way:
So I don't really see the possibility to have a valid site.json-tmpnew and an empty sites.json
Is it an invalid file, or something received from the network? Which site does it relate to?
Currently, the error is: