Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] cannot pass arguments to remote module's methods when proxy is active #56

Open
qku opened this issue Aug 2, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@qku
Copy link
Contributor

qku commented Aug 2, 2023

Version

Release v1.4.1

What is affected by the bug?

Methods of remote qudi modules that take any kind of arguments cannot be called if the flag force_remote_calls_by_value: True is set in the client's config file. See below for the error message.

When does the bug occur?

Every time a method of a remote qudi is called which takes an argument.

How do we replicate the issue?

Configure a qudi instance to act as a server and expose e.g. a data instream dummy. Then configure a client and try calling methods of the data instream dummy. Methods that don't take arguments like start_stream() should work, while read_data() does not.

I also added a very simple test method which takes an argument and then returns it. This also doesn't work, from which I conclude that this is a qudi-core issue and not specific to the instreamer.

Expected behavior

The method of the remote module should work as if it was a local module.

Relevant log output

Traceback (most recent call last):
  File "C:\Software\qudi\qudi-env\lib\site-packages\rpyc\core\protocol.py", line 359, in _dispatch_request
    res = self._HANDLERS[handler](self, *args)
  File "C:\Software\qudi\qudi-env\lib\site-packages\rpyc\core\protocol.py", line 853, in _handle_getattr
    return self._access_attr(obj, name, (), "_rpyc_getattr", "allow_getattr", getattr)
  File "C:\Software\qudi\qudi-env\lib\site-packages\rpyc\core\protocol.py", line 781, in _access_attr
    return accessor(obj, name, *args)
  File "C:\Software\qudi\qudi-env\lib\site-packages\qudi\core\services.py", line 245, in __getattribute__
    def wrapped(*args, **kwargs):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\functools.py", line 56, in update_wrapper
    setattr(wrapper, attr, value)
TypeError: __annotations__ must be set to a dict object

Additional Comments

I first believed this to be specific to the instreamer and therefore raised this issue in qudi-iqo-modules.

Contact Details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant