RasaHQ / rasa

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
https://rasa.com/docs/rasa/
Apache License 2.0
18.92k stars 4.63k forks source link

python-socketio and python-engineio versions are incompatible #8092

Closed adrianvisovan closed 3 years ago

adrianvisovan commented 3 years ago

Rasa version: 2.3.4

Socket.IO Javacsript client version: 3.1.2

Operating system: osx

Issue: Connecting to Rasa 2.3.4 using socket.io is not possible due to the versions incompatibility of python-socketio and python-engineio.

According to the official python-socketio documentation, if the version of the python-socketio is 5.X, then the version of python-engineio should be 4.X.

Solution could be to increment the version of python-engineio dependency to at least 4.0.0

Error:

message async handler error
Traceback (most recent call last):
  File "/opt/venv/lib/python3.8/site-packages/engineio/asyncio_server.py", line 423, in _trigger_event
    ret = await self.handlers[event](*args)
  File "/opt/venv/lib/python3.8/site-packages/socketio/asyncio_server.py", line 524, in _handle_eio_message
    await self._handle_connect(eio_sid, pkt.namespace)
  File "/opt/venv/lib/python3.8/site-packages/socketio/asyncio_server.py", line 408, in _handle_connect
    sid = self.manager.connect(eio_sid, namespace)
  File "/opt/venv/lib/python3.8/site-packages/socketio/base_manager.py", line 46, in connect
    sid = self.server.eio.generate_id()
AttributeError: 'AsyncServer' object has no attribute 'generate_id'

Command or request that led to error:

Connecting to Rasa 2.3.4 using socketio from the Javascript socket.io-client:

io('http://localhost:5005', {
      path: '/socket.io/',
      transports: ['websocket']
    })

Content of configuration file (credentials.yml)

socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: false
sara-tagger commented 3 years ago

Thanks for raising this issue, @samsucik will get back to you about it soon✨

Please also check out the docs and the forum in case your issue was raised there too 🤗
mrka124 commented 3 years ago

Is this fixed in 2.4.0?

nmhjoyal commented 3 years ago

We are also awaiting a fix for this. Our project uses pip-tools so we can't upgrade Rasa until dependencies are compatible