Git Product home page Git Product logo

Comments (4)

louis-monier avatar louis-monier commented on June 12, 2024

Exact same issue encountered.

from aws-ocpp-gateway.

galinsky avatar galinsky commented on June 12, 2024

Please try updating src/ocpp-gateway-container/requirements.txt to fix the version of the mqtt package to one that pre-dates the version increase of path-mqtt to v2.0.0; e.g.:

asyncio-mqtt==0.16.1

If that solves the problem we’ll update the same in the repo. Thx!

from aws-ocpp-gateway.

louis-monier avatar louis-monier commented on June 12, 2024

I've updated the src/ocpp-gateway-container/requirements.txt file:

boto3
websockets
asyncio-mqtt==0.16.1

And now get the following error in the Gateway Container logs:

Successfully set IOT certificates
Starting the gateway server
ERROR:websockets.server:connection handler failed
Traceback (most recent call last):
  File "/opt/ocpp-gateway/lib64/python3.10/site-packages/websockets/legacy/server.py", line 236, in handler
    await self.ws_handler(self)
  File "/opt/ocpp-gateway/lib64/python3.10/site-packages/websockets/legacy/server.py", line 1175, in _ws_handler
    return await cast(
  File "/opt/ocpp-gateway/server.py", line 33, in handler
    async with gateway.Gateway(charge_point_id, websocket) as iot_connection:
  File "/opt/ocpp-gateway/gateway.py", line 37, in __init__
    super().__init__(
  File "/opt/ocpp-gateway/lib64/python3.10/site-packages/asyncio_mqtt/client.py", line 343, in __init__
    self._client.message_retry_set(message_retry_set)
AttributeError: 'Client' object has no attribute 'message_retry_set'

from aws-ocpp-gateway.

sparkgene avatar sparkgene commented on June 12, 2024

It looks like asyncio-mqtt use paho-mqtt for mqtt client. paho-mqtt client latest version is 2.1.0 but they removed message_retry_set at version 2.0.0.
https://github.com/eclipse/paho.mqtt.python/releases/tag/v2.0.0

So specify paho-mqtt version in src/ocpp-gateway-container/requirements.txt fixed this problem.

boto3
websockets
paho-mqtt==1.6.1
asyncio-mqtt

from aws-ocpp-gateway.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.