Skip to content

Python client crashes on connection when pre-generated stubs are not available #754

@djungelorm

Description

@djungelorm

What happened?

$ python
Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import krpc
>>> krpc.connect()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "env/lib/python3.10/site-packages/krpc/__init__.py", line 54, in connect
    return Client(rpc_connection, stream_connection, use_pregenerated_stubs)
  File "env/lib/python3.10/site-packages/krpc/client.py", line 53, in __init__
    self._types.register_class_type(service_info.name, name, typ)
  File "env/lib/python3.10/site-packages/krpc/types.py", line 66, in register_class_type
    assert key not in self._types
AssertionError

How can someone else reproduce it?

Install KRPC.MechJeb (or some other third party service) and the python client crashes when connecting.

What is your environment?

n/a

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions