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

Trouble sending a message with an argument of type "aay" #54

Closed
yurac opened this issue Jul 27, 2022 · 2 comments
Closed

Trouble sending a message with an argument of type "aay" #54

yurac opened this issue Jul 27, 2022 · 2 comments

Comments

@yurac
Copy link

yurac commented Jul 27, 2022

Is sending array of arrays of bytes supported?

I get this:
File "/cyc_bsc/scripts/stfs/avahi_wrapper.py", line 69, in start
await self.group.AddService(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, 0, self.name, self.type, self.domain, self.host, self.port, self.text)
File "/usr/lib/python3.6/site-packages/ravel.py", line 2839, in call_method
_append_args(message, intr_method, args, kwargs)
File "/usr/lib/python3.6/site-packages/ravel.py", line 2776, in _append_args
message.append_objects(call_info.in_signature, *message_args)
File "/usr/lib/python3.6/site-packages/dbussy.py", line 4451, in append_objects
append_sub(parse_signature(signature), args, self.iter_init_append())
File "/usr/lib/python3.6/site-packages/dbussy.py", line 4415, in append_sub
if type_is_fixed_array_elttype(arrelttype.code.value) :
AttributeError: 'ArrayType' object has no attribute 'code'

Where I try to call avahi AddService message with the following signature:

    <method name="AddService">                                                                                          
      <arg name="interface" type="i" direction="in"/>                                                                   
      <arg name="protocol" type="i" direction="in"/>                                                                    
      <arg name="flags" type="u" direction="in"/>                                                                       
      <arg name="name" type="s" direction="in"/>                                                                        
      <arg name="type" type="s" direction="in"/>                                                                        
      <arg name="domain" type="s" direction="in"/>                                                                      
      <arg name="host" type="s" direction="in"/>                                                                        
      <arg name="port" type="q" direction="in"/>                                                                        
      <arg name="txt" type="aay" direction="in"/>                                                                       
    </method>

Seems that the problem is with the last argument.
I tried passing various values to it but nothing works.
Any idea?

@ldo
Copy link
Owner

ldo commented Jul 27, 2022

Looks like a duplicate of #46, previously fixed.

@yurac
Copy link
Author

yurac commented Jul 28, 2022

Thanks @ldo, I updated to the version from git and it works now

@yurac yurac closed this as completed Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants