Skip to content

[Bug] Remote Modules - Getting/Setting switch state from manager on client qudi; Maybe underlying Issue? #63

Description

@LukePiewalker

Version

Development

What is affected by the bug?

Getting/Setting the switch state of a remote SwitchDummy from the IPython console at the client qudi session causes errors and does not update the switch state on the host as requested.

Did not dive further down to see if this is something specific about the Switch Toolchain or rather some underlying issue in the core.

When does the bug occur?

Getting/Setting the switch state of a remote SwitchDummy from the IPython console at the client qudi session.

Does however !not! occur when using the whole toolchain (gui, logic and hardware)? There all elements update accordingly. So setting the value on over the client GUI in turn ends up correctly on the host Switch GUI (with active watchdog)

How do we replicate the issue?

  • Set up SwitchDummy as a remote module on one machine (Win10)
  • Connecting to the remote module from another machine (Win10)
  • Try to set a switch state with e.g my_remote_dummy_switch.set_state('one', 'up')

Expected behavior

Status of the switch on the host qudi session updates accordingly, and also value can be retrieved from the remote session in the console.

Relevant log output

TypeError                                 Traceback (most recent call last)
Input In [5], in <cell line: 1>()
----> 1 testmod.set_state('one', 'up')

File C:\ProgramData\Anaconda3\envs\qudi-env\lib\site-packages\rpyc\core\netref.py:148, in BaseNetref.__getattribute__(self, name)
    146     return object.__getattribute__(self, "__array__")
    147 else:
--> 148     return syncreq(self, consts.HANDLE_GETATTR, name)

File C:\ProgramData\Anaconda3\envs\qudi-env\lib\site-packages\rpyc\core\netref.py:63, in syncreq(proxy, handler, *args)
     51 """Performs a synchronous request on the given proxy object.
     52 Not intended to be invoked directly.
     53 
   (...)
     60 :returns: the result of the operation
     61 """
     62 conn = object.__getattribute__(proxy, "____conn__")
---> 63 return conn.sync_request(handler, proxy, *args)

File C:\ProgramData\Anaconda3\envs\qudi-env\lib\site-packages\rpyc\core\protocol.py:490, in Connection.sync_request(self, handler, *args)
    487 _async_res = self.async_request(handler, *args, timeout=timeout)
    488 # _async_res is an instance of AsyncResult, the value property invokes Connection.serve via AsyncResult.wait
    489 # So, the _recvlock can be acquired multiple times by the owning thread and warrants the use of RLock
--> 490 return _async_res.value

File C:\ProgramData\Anaconda3\envs\qudi-env\lib\site-packages\rpyc\core\async_.py:108, in AsyncResult.value(self)
    106 self.wait()
    107 if self._is_exc:
--> 108     raise self._obj
    109 else:
    110     return self._obj

TypeError: __annotations__ must be set to a dict object

========= Remote Traceback (1) =========
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\envs\qudi-env\lib\site-packages\rpyc\core\protocol.py", line 324, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "C:\ProgramData\Anaconda3\envs\qudi-env\lib\site-packages\rpyc\core\protocol.py", line 625, in _handle_getattr
    return self._access_attr(obj, name, (), "_rpyc_getattr", "allow_getattr", getattr)
  File "C:\ProgramData\Anaconda3\envs\qudi-env\lib\site-packages\rpyc\core\protocol.py", line 553, in _access_attr
    return accessor(obj, name, *args)
  File "C:\Users\LukasAntoniuk\PycharmProjects\qudi-core\src\qudi\core\services.py", line 245, in __getattribute__
    def wrapped(*args, **kwargs):
  File "C:\ProgramData\Anaconda3\envs\qudi-env\lib\functools.py", line 56, in update_wrapper
    setattr(wrapper, attr, value)
TypeError: __annotations__ must be set to a dict object

Additional Comments

No response

Contact Details

lukas.antoniuk@uni-ulm.de

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions