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

Problem with serialization #88

Open
bretbas opened this issue Apr 9, 2022 · 0 comments
Open

Problem with serialization #88

bretbas opened this issue Apr 9, 2022 · 0 comments

Comments

@bretbas
Copy link

bretbas commented Apr 9, 2022

Hello, everyone!
I wanted to test your lib for using it in the prod, but i could't to send message, because it is not serialized right
I create the same client app, but on the dotnet, and all work fine.

But when i use your lib, i have a problem:

2022-04-09 16:38:18,640 - SignalRCoreClient - DEBUG - Handler registered started TestClientEvent

2022-04-09 16:38:18,642 - SignalRCoreClient - DEBUG - Connection started

2022-04-09 16:38:18,642 - SignalRCoreClient - DEBUG - Negotiate url:http://localhost:40071/test-hub/negotiate

2022-04-09 16:38:18,710 - SignalRCoreClient - DEBUG - Response status code200

2022-04-09 16:38:18,711 - SignalRCoreClient - DEBUG - start url:ws://localhost:40071/test-hub?id=FumuYZ40TqJWOVEMYe8sRA

2022-04-09 16:38:18,711 - SignalRCoreClient - DEBUG - Sending message InvocationMessage: invocation_id b0b25f8e-b8fa-4e7a-84ff-b51272f4a06e, target TestMethod, arguments [<class '__main__.subject'>]

Traceback (most recent call last):

  File "C:/Users/Сергей/PycharmProjects/pythonProject1/main.py", line 44, in <module>

    hub_connection.send("TestMethod", [subject])

  File "C:\Users\Сергей\PycharmProjects\SignalRTest\lib\site-packages\signalrcore\hub\base_hub_connection.py", line 147, in send

    self.transport.send(message)

  File "C:\Users\Сергей\PycharmProjects\SignalRTest\lib\site-packages\signalrcore\transport\websockets\websocket_transport.py", line 217, in send

    raise ex

  File "C:\Users\Сергей\PycharmProjects\SignalRTest\lib\site-packages\signalrcore\transport\websockets\websocket_transport.py", line 196, in send

    self.protocol.encode(message),

  File "C:\Users\Сергей\PycharmProjects\SignalRTest\Lib\signalrcore\protocol\messagepack_protocol.py", line 72, in encode

    encoded_message = msgpack.packb(msg)

  File "C:\Users\Сергей\PycharmProjects\SignalRTest\lib\site-packages\msgpack\__init__.py", line 35, in packb

    return Packer(**kwargs).pack(o)

  File "msgpack\_packer.pyx", line 292, in msgpack._cmsgpack.Packer.pack

  File "msgpack\_packer.pyx", line 298, in msgpack._cmsgpack.Packer.pack

  File "msgpack\_packer.pyx", line 295, in msgpack._cmsgpack.Packer.pack

  File "msgpack\_packer.pyx", line 264, in msgpack._cmsgpack.Packer._pack

  File "msgpack\_packer.pyx", line 264, in msgpack._cmsgpack.Packer._pack

  File "msgpack\_packer.pyx", line 289, in msgpack._cmsgpack.Packer._pack

TypeError: can not serialize 'type' object
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

1 participant