HelloZeroNet / HelloZeroNet/ZeroNet
KeyError: 'data/users/content.json'
- Ngôn ngữ chính
- JavaScript
- Star
- 18.8k
- Fork
- 2.3k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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'
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng cách lần theo các đường dẫn tải nội dung trong src/Site/Site.py tại dòng 203 và 263, sau đó kiểm tra src/Content/ContentDbDict.py tại dòng 59. Tái hiện KeyError đối với data/users/content.json và xác định lý do ánh xạ nội dung thiếu khóa đó; công việc được xem là hoàn tất khi đường dẫn tải được báo cáo không còn phát sinh ngoại lệ này và hành vi liên quan được kiểm thử.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100