HelloZeroNet / HelloZeroNet/ZeroNet

KeyError - sidebarGetHtmlTag - SidebarPlugin.py

Đang mở
#1,935 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
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ả

### Step 1: Please describe your environment

* ZeroNet version: 3853
* Operating system: W10
* Web browser: Firefox
* Tor status: available
* Opened port: no
* Special configuration: multiuser_local

### Step 2: Describe the problem:

Hello, i visited a hub zite several times in last days and its zeronet menu (corner button) shows nothing in the menu, only black and debug.log shows this site relevant entry:

> ERROR Site:abc..def WebSocket handleRequest error: KeyError: u'folder/subfolder /content.json' in UiWebsocket.py line 83 > UiWebsocket.py line 267 > SidebarPlugin.py line 531 > SidebarPlugin.py line 196 > ContentManager.py line 322 > ContentManager.py line 322 > ContentManager.py line 320 > ContentDbDict.py line 61 > ContentDbDict.py line 34
{"cmd":"sidebarGetHtmlTag","params":{},"id":1000002}

(subfolder name contains ":" and there is space at the end. I checked and that folder does not exist on my end.

When i deleted site and opened again, menu started opening. If anyone interested here how i deleted the site while preserving all optional files i downloaded:

> 1. I backed up "folder"
> 2. deleted site
> 3. visited site
> 4. copied back "folder" (and skipped files that existed on newly downloaded site)
> 5. on ZeroHello i "Check files" of that site
> 6. site menu now opens

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 với yêu cầu sidebarGetHtmlTag trong SidebarPlugin.py, sau đó lần theo traceback qua UiWebsocket.py và ContentManager.py đến phần tra cứu trong ContentDbDict.py. Tái hiện trường hợp content.json của thư mục/thư mục con bị sai định dạng và xác định cách khóa bị thiếu đi đến sidebar. Hoàn tất khi menu sidebar mở được mà không có KeyError này đối với trạng thái site được báo cáo.

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
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.