v2.1.0 Equipment Entry: Changes on webpage can lead to crash
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
Hướng nghiên cứu
The crash is a ValueError in PiFinder/equipment.py set_active_eyepiece (line 44), where self.eyepieces.index(eyepiece) fails after webserver edits because the in-memory list is stale. Start by reproducing: edit an eyepiece via the webserver (PiFinder server code), then navigate into the eyepiece menu in ui/text_menu.py and check how config.set_option in config.py syncs with equipment.py. Also compare the telescope list path per the issue note. Done means webserver edits are reflected on the device and selecting the edited eyepiece no longer crashes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When changing equipment on the entry page of the webserver, changes are not reflected in the Equipment view.
Steps to reproduce:
- Enter tools > equipment > eyepiece
- Leave that screen by moving left
- Open the equipment page in the server
- update the focal length of an eyepiece and save.
Expected behavior:
5. enter the eyepiece screen again.
6. changes from entering are reflected in the view.
Experienced behavior:
5. enter the eyepiece screen again
6. Changes are not reflected there.
7. selecting the changed eyepiece creates a crash
Note: If the selected eyepiece is changed, the change is reflected in "Equipment" on the screen.
Crash report from step 7:
Traceback (most recent call last):
File "/home/grimaldi/Projects/PiFinder/PiFinder/python/PiFinder/main.py", line 876, in
main(log_helper, args.script, args.fps, args.verbose)
File "/home/grimaldi/Projects/PiFinder/PiFinder/python/PiFinder/main.py", line 665, in main
menu_manager.key_right()
File "/home/grimaldi/Projects/PiFinder/PiFinder/python/PiFinder/ui/menu_manager.py", line 469, in key_right
self.stack[-1].key_right()
File "/home/grimaldi/Projects/PiFinder/PiFinder/python/PiFinder/ui/text_menu.py", line 188, in key_right
self.config_object.set_option(config_option, config_value)
File "/home/grimaldi/Projects/PiFinder/PiFinder/python/PiFinder/config.py", line 71, in set_option
self.equipment.set_active_eyepiece(value)
File "/home/grimaldi/Projects/PiFinder/PiFinder/python/PiFinder/equipment.py", line 44, in set_active_eyepiece
self.active_eyepiece_index = self.eyepieces.index(eyepiece)
ValueError: Eyepiece(make='TS', name='Überblick', focal_length_mm=38.0, afov=70, field_stop=0.0) is not in list
Please also check list of telescope for same bug.
- Ngôn ngữ chính
- Jupyter Notebook
- Star
- 253
- Fork
- 63
- Merge trung bình
- 11 giờ 55 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của brickbots/PiFinder
-
Discord Link InvalidĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 67/100
brickbots/PiFinder#682 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
catalogs enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày