HelloZeroNet / HelloZeroNet/ZeroNet

KeyError: 'data/users/content.json'

Open
#2,706 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
18.8k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Any fix to this?
```
[15:19:44] Site:1DdPHe..Vi9D ContentDb not initialized, load files from filesystem...
[15:19:50] - Unhandled exception: KeyError: 'data/users/content.json' in /greenlet.py line 766 > Site.py line 263 > ContentDbDict.py line 59
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
File "/home/ZeroNet/src/Site/Site.py", line 263, in downloadContent
for file_relative_path in list(self.content_manager.contents[inner_path].get("includes", {}).keys()):
File "/home/ZeroNet/src/Content/ContentDbDict.py", line 59, in __getitem__
raise KeyError(key)
KeyError: 'data/users/content.json'
[15:19:50] - Unhandled exception: KeyError: 'data/users/content.json' in /greenlet.py line 766 > Site.py line 203 > ContentDbDict.py line 59
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 766, in gevent._greenlet.Greenlet.run
File "/home/ZeroNet/src/Site/Site.py", line 203, in downloadContent
for file_relative_path in list(self.content_manager.contents[inner_path].get("files", {}).keys()):
File "/home/ZeroNet/src/Content/ContentDbDict.py", line 59, in __getitem__
raise KeyError(key)
KeyError: 'data/users/content.json'
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the content-loading paths in src/Site/Site.py at lines 203 and 263, then inspect src/Content/ContentDbDict.py at line 59. Reproduce the KeyError for data/users/content.json and determine why the content mapping lacks that key; done means the reported loading path no longer raises this exception and related behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.