v2.1.0 Equipment Entry: Changes on webpage can lead to crash
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- python
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 253
- Forks
- 63
- Merge medio
- 11 h 55 min
- PR fusionados (30 d)
- 8
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de brickbots/PiFinder
-
Discord Link InvalidAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 67/100
brickbots/PiFinder#682 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
catalogs enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día