toreamun / asyncio-paho

Paho MQTT client supporting asyncio loop without additional setup.
MIT License
15 stars 3 forks source link

NotImplementedError #17

Open cosmaz opened 1 year ago

cosmaz commented 1 year ago

Noyhing changed.....

Возникло исключение: NotImplementedError exception: no description File "D:\Projects_TakeYours\Server\src\server.py", line 77, in main await client.asyncio_connect(MQTT_HOST, MQTT_PORT, 60)

During handling of the above exception, another exception occurred:

File "D:\Projects_TakeYours\Server\src\server.py", line 73, in main async with AsyncioPahoClient() as client: File "D:\Projects_TakeYours\Server\src\server.py", line 82, in asyncio.run(main())

ezelbanaan commented 1 year ago

This might fix your issue, bassicly add:

asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

Before:

asyncio.run(main())

Or whatever other way you're using to run you application