Skip to content

Unexpected token #9

@phillebaba

Description

@phillebaba
bus = await MessageBus(bus_type = BusType.SYSTEM).connect()
introspection = await bus.introspect('org.freedesktop.login1', '/org/freedesktop/login1')

This example code throws the following exception when run.

  File "/home/user/.virtualenvs/alfrodull/lib/python3.7/site-packages/dbus_next/signature.py", line 63, in _parse_next
    raise InvalidSignatureError(f'got unexpected token: "{token}"')
dbus_next.errors.InvalidSignatureError: got unexpected token: "h"

I have not had time to fully understand the function of signature.py but I think the issue is caused by the token missing in the string on line 23 rather than the token being invalid.

Changing _tokens = 'ybnqiuxtdsogav({' to _tokens = 'hybnqiuxtdsogav({' seems to resolve the problem.

Is this correct or have I misunderstood something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions