blumzi / LAST_next_generation

Design and implementation of a new LAST architecture
GNU General Public License v3.0
0 stars 0 forks source link

probing error? #7

Closed EastEriq closed 7 months ago

EastEriq commented 9 months ago

What is this error? Now the focuser object was correctly created, the configuration points at the right place, and the .probe method is api decorated and returns a boolean. (happens for both focusers, so it is common code)

10:18:25.260 [ERR] Exception: MATLAB:index:expected_one_output_from_expression - Expected one output from a curly brace or dot indexing expression, but there were 0 results. - Expected one output from a curly brace or dot indexing expression, but there were 0 results.
10:18:25.257 [Err] [focuser-2] Error in obs.api.POSIXsocket.pyPOSIXsocket/sendto (line 45)
10:18:25.257 [Err] [focuser-2]             bytes = obj.socket.s.sendto(msg,targetPath);
10:18:25.257 [Err] [focuser-2] Error in obs.api.Lipp/sendProbingResult (line 234)
10:18:25.257 [Err] [focuser-2]                 Obj.ProbingSocket.sendto(Obj.ProbingSocketPath, data);
10:18:25.257 [Err] [focuser-2] Error in obs.api.Lipp/loop (line 263)
10:18:25.257 [Err] [focuser-2]                             Obj.sendProbingResult(outgoing); - Failed to send (on POSIX socket ' lipp-unit-focuser-2-probing') data='{"AnswersToProbe":false}' 
10:18:25.365 [INF] [focuser-2] [pid=913283] lipp-driver-focuser-2: bailOut: msg='sendProbingResult'
10:18:25.373 [INF] [focuser-2] [pid=913283] lipp-driver-focuser-2: bailOut:  from Lipp.m:237 Lipp.sendProbingResult
10:18:25.378 [INF] [focuser-2] [pid=913283] lipp-driver-focuser-2: bailOut:  from Lipp.m:263 Lipp.loop
10:18:25.384 [INF] [focuser-2] [pid=913283] lipp-driver-focuser-2: bailOut: <<< pid: 913283, (exiting with rc=1)  >>>
EastEriq commented 9 months ago

Ditto for mount: the log says

[913391] 2024-01-23 10:18:22.757 > =========================================== Started
[913391] 2024-01-23 10:18:22.891 > =========================================== Started
[913391] 2024-01-23 10:18:22.912 > [INF] [mount-11] [pid=913391] lipp-driver-mount: ---- Started ----
[913391] 2024-01-23 10:18:23.086 > [INF] [mount-11] [pid=913391] lipp-driver-mount: created POSIX socket path='lipp-driver-mount', timeout=5
[913391] 2024-01-23 10:18:23.139 > [INF] [mount-11] [pid=913391] lipp-driver-mount: Calling bs.api.makeApi('Location', '
[913391] 2024-01-23 10:18:23.445 > =========================================== Started
[913391] 2024-01-23 10:18:23.635 > =========================================== Started
[913391] 2024-01-23 10:18:24.039 > =========================================== Started
[913391] 2024-01-23 10:18:24.274 > [INF] [mount-11] [pid=913391] lipp-driver-mount: OK, got a 'obs.api.wrappers.mount' for a 'inst.XerxesMountBinary' object
[913391] 2024-01-23 10:18:30.606 > [INF] [mount-11] [pid=913391] lipp-driver-mount: Driver 'lipp-driver-mount' is 'detected'
[913391] 2024-01-23 10:18:35.754 > [[ERR] ] Exception: MATLAB:index:expected_one_output_from_expression - Expected one output from a curly brace or dot indexing
 expression, but there were 0 results. - Expected one output from a curly brace or dot indexing expression, but there were 0 results.
10:18:35.657 [Err] [mount-11] Error in obs.api.POSIXsocket.pyPOSIXsocket/sendto (line 45)
10:18:35.657 [Err] [mount-11]             bytes = obj.socket.s.sendto(msg,targetPath);
10:18:35.657 [Err] [mount-11] Error in obs.api.Lipp/sendProbingResult (line 234)
10:18:35.657 [Err] [mount-11]                 Obj.ProbingSocket.sendto(Obj.ProbingSocketPath, data);
10:18:35.657 [Err] [mount-11] Error in obs.api.Lipp/loop (line 263)
10:18:35.657 [Err] [mount-11]                             Obj.sendProbingResult(outgoing); - Failed to send (on POSIX socket 'AnswersToProbe":false}' 
[913391] 2024-01-23 10:18:35.761 > [INF] [mount-11] [pid=913391] lipp-driver-mount: bailOut: msg='sendProbingResult'
[913391] 2024-01-23 10:18:35.767 > [INF] [mount-11] [pid=913391] lipp-driver-mount: bailOut:  from Lipp.m:237 Lipp.sendProbingResult
[913391] 2024-01-23 10:18:35.772 > [INF] [mount-11] [pid=913391] lipp-driver-mount: bailOut:  from Lipp.m:263 Lipp.loop
[913391] 2024-01-23 10:18:35.778 > [INF] [mount-11] [pid=913391] lipp-driver-mount: bailOut: <<< pid: 913391, (exiting with rc=1)  >>>
EastEriq commented 9 months ago

Since I completed the probe methods for camera, focuser and mount, the webby is not affective on them anymore - I get like

Response body
{
  "Error": "LIPP connection to 'lipp-driver-focuser-1' refused"
}

I imagine this is due to the bailouts. Hm, maybe something wrong with my understanding that .probe should return a boolean? Where is that written?

blumzi commented 9 months ago

Fixed with commit #8d7178d

EastEriq commented 9 months ago

https://github.com/blumzi/LAST_Api/commit/8d7178dde472a9e5f0451d0083a1cd37bc068313

EastEriq commented 9 months ago

It seems that I still get it:

13:42:21.897 [ERR] Exception: MATLAB:index:expected_one_output_from_expression - Expected one output from a curly brace or dot indexing expression, but there were 0 results. - Expected one output from a curly brace or dot indexing expression, but there were 0 results.
13:42:21.894 [Err] [camera-2] Error in obs.api.POSIXsocket.pyPOSIXsocket/sendto (line 45)
13:42:21.894 [Err] [camera-2]             bytes = obj.socket.s.sendto(msg,targetPath);
13:42:21.894 [Err] [camera-2] Error in obs.api.Lipp/sendProbingResult (line 235)
13:42:21.894 [Err] [camera-2]                 bytes_sent = Obj.ProbingSocket.sendto(Obj.ProbingSocketPath, data);
13:42:21.894 [Err] [camera-2] Error in obs.api.Lipp/loop (line 264)
13:42:21.894 [Err] [camera-2]                             Obj.sendProbingResult(outgoing); - Failed to send (on POSIX socket ' lipp-unit-camera-2-probing') data='{"AnswersToProbe":false}, bytes_sent=-1' 
13:42:22.003 [INF] [camera-2] [pid=3832822] lipp-driver-camera-2: bailOut: msg='sendProbingResult'
13:42:22.007 [INF] [camera-2] [pid=3832822] lipp-driver-camera-2: bailOut:  from Lipp.m:238 Lipp.sendProbingResult
13:42:22.011 [INF] [camera-2] [pid=3832822] lipp-driver-camera-2: bailOut:  from Lipp.m:264 Lipp.loop
13:42:22.014 [INF] [camera-2] [pid=3832822] lipp-driver-camera-2: bailOut: <<< pid: 3832822, (exiting with rc=1)  >>>

13:42:23.012 [INF] [pid=3832822] {inst.QHYccd} Succesfully closed "QHY600M-e69896449e35647d5"

13:42:23.054 [INF] [pid=3832822] {inst.QHYccd} last QHY object destroyed, releasing library

13:42:23.077 [INF] [pid=3832822] {inst.QHYccd} Released...

Same was for camera1, which lead to a segfault, as per https://github.com/EastEriq/LAST_QHYccd/issues/1, it seems a bit random when and when not (typical hint of a race), but that is still another story.

Reopening....

EastEriq commented 9 months ago

Fixed with commit #8d7178d

I think that you tackled the second line of the error stack, not the one which it calls (line45 of obs.api.POSIXsocket.pyPOSIXsocket/sendto) and generates the error

EastEriq commented 9 months ago

Might it be that a definition of sendto, on the lines of that of recv, is missing in LAST_Api/+obs/+api/+POSIXsocket/pyPOSIXsocket.py?

blumzi commented 9 months ago

I added the sendto but I can't test it on my machine. Please try it on the last11 machines. I'm not sure this is the fix, but let's see.

EastEriq commented 7 months ago

As of today I don't get these errors anymore, so I think the issue can be closed.