Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

SimpleSCPIGetEntity crashes when "base_str" is wrong

Abierto
#150 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
backend

Línea de trabajo

Empieza en ethernet_scpi_service.py:153, en send_to_device, y luego sigue la llamada a través de entity_endpoints.py:on_get y core/entity.py:scheduled_log. Reproduce el caso de base_str no válido y asegúrate de que informe de un error en lugar de lanzar la excepción ThrowReply no definida y terminar el servicio.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

For a SCPI device that accepts READ? for readout, if I put READ? in the base_str (which is wrong; should be READ), Dripline crashes instead of printing an error message:

Emss-Cath-Egun_1   | Formatting socket_info: ("10.0.0.58",10001)
Emss-Cath-Egun_1   | Ethernet socket ('10.0.0.58', 10001) established
Emss-Cath-Egun_1   | sending: b'*RST\nRANG:AUTO ON\nSYST:ZCH OFF\nFORM:ELEM READ\n*IDN?\r'
Emss-Cath-Egun_1   | 'KEITHLEY INSTRUMENTS INC.,MODEL 6485,4572064,C01   Jun 23 2010 12:22:00/B01  /J\r'
Emss-Cath-Egun_1   | sync: '*RST\nRANG:AUTO ON\nSYST:ZCH OFF\nFORM:ELEM READ\n*IDN?\r' -> 'KEITHLEY INSTRUMENTS INC.,MODEL 6485,4572064,C01   Jun 23 2010 12:22:00/B01  /J'
Emss-Cath-Egun_1   | service built
Emss-Cath-Egun_1   | creating object from:
Emss-Cath-Egun_1   | {'name': 'nA_Emss_Cath_Egun', 'log_on_set': True, 'base_str': 'READ?', 'module': 'SimpleSCPIGetEntity', 'log_interval': 10, 'get_on_set': True}
Emss-Cath-Egun_1   | ...
Emss-Cath-Egun_1   | queue up start logging for 'nA_Emss_Cath_Egun'
Emss-Cath-Egun_1   | should start logging every 0:00:10
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) ary/scheduler.hh(228): Scheduling a repeating event
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) ary/scheduler.hh(250): New first event
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) ary/scheduler.hh(259): That event was first; waking execution thread
Emss-Cath-Egun_1   | log action id is 0
Emss-Cath-Egun_1   | about to start the service
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [ INFO] (tid 140507385546560) brary/service.cc(141): Connecting to <rabbit-broker:5672>
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) brary/service.cc(269): Opening channel for service <Emss_Cath_Egun>
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) /library/core.cc(287): Opening AMQP connection and creating channel to rabbit-broker:5672
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) /library/core.cc(288): Using broker authentication: dripline:dripline
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(310): Executing first event from the map
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(56): executing
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(232): wrapped execution
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(228): Scheduling a repeating event
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(236): executing the wrapped executable
Emss-Cath-Egun_1   | 2023-09-29 20:44:43 [ERROR] (tid 140507337328384) ity/terminate.cc(53): Caught unhandled exception. what(): Exception: name 'ThrowReply' is not defined
Emss-Cath-Egun_1   | 
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) brary/service.cc(306): Binding keys for synchronous children
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) /library/core.cc(373): Binding key <nA_Emss_Cath_Egun.#> to queue <Emss_Cath_Egun> over exchange <requests>
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) brary/service.cc(314): Binding keys for asynchronous children
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) /library/core.cc(399): Starting to consume messages on queue <Emss_Cath_Egun>
Emss-Cath-Egun_1   | services started, now to listen
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(292): Starting scheduler
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [ INFO] (tid 140507385546560) brary/service.cc(370): Listening for incoming messages on <Emss_Cath_Egun>
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [ INFO] (tid 140507345721088) y/heartbeater.cc(68): Starting heartbeat loop
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(310): Executing first event from the map
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(56): executing
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(232): wrapped execution
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(228): Scheduling a repeating event
Emss-Cath-Egun_1   | 2023-09-29 20:44:23 [DEBUG] (tid 140507337328384) ary/scheduler.hh(236): executing the wrapped executable
Emss-Cath-Egun_1   | 2023-09-29 20:44:43 [ERROR] (tid 140507337328384) ity/terminate.cc(53): Caught unhandled exception. what(): Exception: name 'ThrowReply' is not defined
Emss-Cath-Egun_1   | 
Emss-Cath-Egun_1   | At:
Emss-Cath-Egun_1   |   /usr/local/lib/python3.5/site-packages/dripline/implementations/ethernet_scpi_service.py(153): send_to_device
Emss-Cath-Egun_1   |   /usr/local/lib/python3.5/site-packages/dripline/implementations/entity_endpoints.py(48): on_get
Emss-Cath-Egun_1   |   /usr/local/lib/python3.5/site-packages/dripline/core/calibrate.py(26): wrapper
Emss-Cath-Egun_1   |   /usr/local/lib/python3.5/site-packages/dripline/core/entity.py(135): scheduled_log
Emss-Cath-Egun_1   | 
Emss-Cath-Egun_1   | 2023-09-29 20:44:43 [ERROR] (tid 140507337328384) ity/terminate.cc(64): Backtrace from terminate() returned 22 frames
Emss-Cath-Egun_1   | 
Emss-Cath-Egun_1   | 2023-09-29 20:44:43 [ERROR] (tid 140507337328384) ity/terminate.cc(73): Backtrace:
Emss-Cath-Egun_1   | [bt]: (0) /usr/local/lib/libScarab_Dripline_DriplinePy.so(_ZN6scarab9terminateEv+0x50) [0x7fca6c04a99d]
Emss-Cath-Egun_1   | [bt]: (1) /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x928c6) [0x7fca6bce28c6]
Emss-Cath-Egun_1   | [bt]: (2) /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x92901) [0x7fca6bce2901]
Emss-Cath-Egun_1   | [bt]: (3) /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x92b34) [0x7fca6bce2b34]
Emss-Cath-Egun_1   | [bt]: (4) /usr/local/lib/python3.5/site-packages/_dripline.cpython-35m-x86_64-linux-gnu.so(+0xad101) [0x7fca6baf9101]
Emss-Cath-Egun_1   | [bt]: (5) /usr/local/lib/python3.5/site-packages/_dripline.cpython-35m-x86_64-linux-gnu.so(+0x9bc19) [0x7fca6bae7c19]
Emss-Cath-Egun_1   | [bt]: (6) /usr/local/lib/python3.5/site-packages/_dripline.cpython-35m-x86_64-linux-gnu.so(+0x134c82) [0x7fca6bb80c82]
Emss-Cath-Egun_1   | [bt]: (7) /usr/local/lib/python3.5/site-packages/_dripline.cpython-35m-x86_64-linux-gnu.so(+0x14a308) [0x7fca6bb96308]
Emss-Cath-Egun_1   | [bt]: (8) /usr/local/lib/python3.5/site-packages/_dripline.cpython-35m-x86_64-linux-gnu.so(_ZNKSt8functionIFvvEEclEv+0x32) [0x7fca6bae9c86]
Emss-Cath-Egun_1   | [bt]: (9) /usr/local/lib/python3.5/site-packages/_dripline.cpython-35m-x86_64-linux-gnu.so(+0xc36a5) [0x7fca6bb0f6a5]
Emss-Cath-Egun_1   | [bt]: (10) /usr/local/lib/python3.5/site-packages/_dripline.cpython-35m-x86_64-linux-gnu.so(+0x108a7d) [0x7fca6bb54a7d]
Emss-Cath-Egun_1   | [bt]: (11) /usr/local/lib/python3.5/site-packages/_dripline.cpython-35m-x86_64-linux-gnu.so(_ZNKSt8functionIFvvEEclEv+0x32) [0x7fca6bae9c86]
Emss-Cath-Egun_1   | [bt]: (12) /usr/local/lib/libDripline_DriplinePy.so(_ZN8dripline15simple_executorclESt8functionIFvvEE+0xf1) [0x7fca6b97f029]
Emss-Cath-Egun_1   | [bt]: (13) /usr/local/lib/libDripline_DriplinePy.so(_ZN8dripline9schedulerINS_15simple_executorENSt6chrono3_V212system_clockEE7executeEv+0x33b) [0x7fca6b9800f7]
Emss-Cath-Egun_1   | [bt]: (14) /usr/local/lib/libDripline_DriplinePy.so(_ZSt13__invoke_implIvMN8dripline9schedulerINS0_15simple_executorENSt6chrono3_V212system_clockEEEFvvEPNS0_7serviceEJEET_St21__invoke_memfun_derefOT0_OT1_DpOT2_+0x74) [0x7fca6b981d66]
Emss-Cath-Egun_1   | [bt]: (15) /usr/local/lib/libDripline_DriplinePy.so(_ZSt8__invokeIMN8dripline9schedulerINS0_15simple_executorENSt6chrono3_V212system_clockEEEFvvEJPNS0_7serviceEEENSt15__invoke_resultIT_JDpT0_EE4typeEOSC_DpOSD_+0x37) [0x7fca6b9803e3]
Emss-Cath-Egun_1   | [bt]: (16) /usr/local/lib/libDripline_DriplinePy.so(_ZNSt6thread8_InvokerISt5tupleIJMN8dripline9schedulerINS2_15simple_executorENSt6chrono3_V212system_clockEEEFvvEPNS2_7serviceEEEE9_M_invokeIJLm0ELm1EEEEDTcl8__invokespcl10_S_declvalIXT_EEEEESt12_Index_tupleIJXspT_EEE+0x43) [0x7fca6b985517]
Emss-Cath-Egun_1   | [bt]: (17) /usr/local/lib/libDripline_DriplinePy.so(_ZNSt6thread8_InvokerISt5tupleIJMN8dripline9schedulerINS2_15simple_executorENSt6chrono3_V212system_clockEEEFvvEPNS2_7serviceEEEEclEv+0x18) [0x7fca6b9853b8]
Emss-Cath-Egun_1   | [bt]: (18) /usr/local/lib/libDripline_DriplinePy.so(_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJMN8dripline9schedulerINS3_15simple_executorENSt6chrono3_V212system_clockEEEFvvEPNS3_7serviceEEEEEE6_M_runEv+0x1c) [0x7fca6b9852ee]
Emss-Cath-Egun_1   | [bt]: (19) /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xbbb2f) [0x7fca6bd0bb2f]
Emss-Cath-Egun_1   | [bt]: (20) /lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7fca6d036fa3]
Emss-Cath-Egun_1   | [bt]: (21) /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fca6cdda4cf]
Lenguaje dominante
Python
Estrellas
3
Forks
6
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de driplineorg/dripline-python

Todos los issues de driplineorg/dripline-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.