ZeroNet icon indicating copy to clipboard operation
ZeroNet copied to clipboard

AttributeError on sitePublish on Linux

Open wizardforcel opened this issue 5 years ago • 3 comments

- Libsecpk256k1 loaded: CompiledLib in 0.028s
- Version: 0.7.1 r4206, Python 3.7.3 (default, Mar 27 2019, 22:11:17) 
[GCC 7.3.0], Gevent: 1.4.0
SiteManager Deleting orphan site from content.db: 1Name2NXVi1RDPDgf5617UoW7xA6YrhM9F
SiteManager Deleting orphan site from content.db: 1DvxA4WP2jbBaZbTebV1RufMLhTTqDhVUQ
- Loading site...
- Unhandled exception: 'NoneType' object has no attribute 'settings'
Traceback (most recent call last):
  File "/builds/wizardforcel/zeronet-uploader/ZeroNet-linux-dist-linux64/core/zeronet.py", line 17, in main
    main.start()
  File "/builds/wizardforcel/zeronet-uploader/ZeroNet-linux-dist-linux64/core/src/main.py", line 537, in start
    actions.call(config.action, action_kwargs)
  File "/builds/wizardforcel/zeronet-uploader/ZeroNet-linux-dist-linux64/core/src/main.py", line 121, in call
    back = func(**kwargs)
  File "/builds/wizardforcel/zeronet-uploader/ZeroNet-linux-dist-linux64/core/src/main.py", line 381, in sitePublish
    site.settings["serving"] = True  # Serving the site even if its disabled
AttributeError: 'NoneType' object has no attribute 'settings'

wizardforcel avatar Jan 06 '20 09:01 wizardforcel

@wizardforcel This means that ZeroNet couldn't find your site. Is the site listed in both sites.json and users.json? Does its directory contain content.json file?

purplesyringa avatar Jan 06 '20 11:01 purplesyringa

@Crypto-Anarchist @imachug

Thx. I will try to find out what is wrong.

wizardforcel avatar Jan 09 '20 15:01 wizardforcel

@wizardforcel This means that ZeroNet couldn't find your site. Is the site listed in both sites.json and users.json? Does its directory contain content.json file?

Thank You for help, you were right. I had the site in /data/, but not inside /data/*.json files for some reason. Running

python3 zeronet.py siteDownload siteAddressHere Fixed it, no more exception during publishing:

- Unhandled exception: 'NoneType' object has no attribute 'settings'
Traceback (most recent call last):
  File "/home/zeronet/zeronetx/core/zeronet.py", line 17, in main
    main.start()
  File "/home/zeronet/zeronetx/core/src/main.py", line 603, in start
    actions.call(config.action, action_kwargs)
  File "/home/zeronet/zeronetx/core/src/main.py", line 133, in call
    back = func(**kwargs)
           ^^^^^^^^^^^^^^
  File "/home/zeronet/zeronetx/core/src/main.py", line 412, in sitePublish
    site.settings["serving"] = True  # Serving the site even if its disabled
    ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'settings'

(note that this is ZeronetX fork code)

https://github.com/ZeroNetX/ZeroNet/blob/py3-latest/src/main.py

slrslr avatar Apr 30 '25 18:04 slrslr