driplineorg / driplineorg/dripline-python

SimpleSCPIGetEntity crashes when "base_str" is wrong

Open
#150 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3
Forks
6
PR merge metrics
No merged PRs in 30d

Description

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
Emss-Cath-Egun_1 | 2023-09-29 20:44:23 [DEBUG] (tid 140507385546560) brary/service.cc(269): Opening channel for service
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 to queue over exchange
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_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_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]
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.