rasa icon indicating copy to clipboard operation
rasa copied to clipboard

Running socket client throws errors during Interactive Learning

Open erohmensing opened this issue 4 years ago • 14 comments

The socket client points to the rasa server, and if you don't change the defaults, rasa interactive runs on the same port as rasa run – therefore, socket is listening for events during rasa interactive. However, since the socket endpoint is not available during this, it leads to an error:

[2019-08-01 11:45:37 +0200] [23200] [ERROR] Exception occurred while handling uri: 'http://localhost:5005/socket.io/?EIO=3&transport=polling&t=MnCaWoQ' Traceback (most recent call last): File "c:\users\appdata\local\continuum\anaconda3\lib\site-packages\sanic\app.py", line 893, in handle_request handler, args, kwargs, uri = self.router.get(request) File "c:\users\appdata\local\continuum\anaconda3\lib\site-packages\sanic\router.py", line 407, in get return self._get(request.path, request.method, "") File "c:\users\appdata\local\continuum\anaconda3\lib\site-packages\sanic\router.py", line 469, in _get raise NotFound("Requested URL {} not found".format(url)) sanic.exceptions.NotFound: Requested URL /socket.io/ not found [2019-08-01 11:45:37 +0200] [23200] [ERROR] Exception occurred while handling uri: 'http://localhost:5005/socket.io/?EIO=3&transport=polling&t=MnCaXHh' Traceback (most recent call last): File "c:\users\appdata\local\continuum\anaconda3\lib\site-packages\sanic\app.py", line 893, in handle_request handler, args, kwargs, uri = self.router.get(request) File "c:\users\appdata\local\continuum\anaconda3\lib\site-packages\sanic\router.py", line 407, in get return self._get(request.path, request.method, "") File "c:\users\appdata\local\continuum\anaconda3\lib\site-packages\sanic\router.py", line 469, in _get raise NotFound("Requested URL {} not found".format(url)) sanic.exceptions.NotFound: Requested URL /socket.io/ not found [2019-08-01 11:45:37 +0200] [23200] [ERROR] Exception occurred while handling uri: 'http://localhost:5005/socket.io/?EIO=3&transport=polling&t=MnCaXHi'

If we are in interactive mode, we should probably consume this exception since it's not relevant.

erohmensing avatar Sep 19 '19 08:09 erohmensing

@erohmensing you can disconnect the socket client during the rasa interactive in progress, because socket client was retrying every seconds so this error was raised.

soundaraj avatar Oct 09 '19 10:10 soundaraj

@soundaraj I know you can, but it would be nice if it didn't raise the error since it shouldn't matter whether or not the client is connected while you're using interactive mode via the CLI

erohmensing avatar Oct 21 '19 13:10 erohmensing

This also happens if you are using a different connector, e.g. If you normally run with socket and then are testing in rasa shell. So we should only show the exception if the socketio channel is active.

erohmensing avatar Nov 01 '19 09:11 erohmensing

I have the same exception " sanic.exceptions.NotFound: Requested URL /socket.io/ not found " . Do we have any workaround for this also when can we expect this issue to be closed.

optimiztik avatar Nov 10 '19 01:11 optimiztik

@optimiztik the exception does not cause any issues in the bot, it is only because your websocket it still open. The workaround, as @soundaraj said, is to disconnect the socket (close the page with the bot widget) while in interactive mode.

The issue is open as a help wanted issue, which means it is not top priority for us to work on (seeing as it is annoying, but doesn't cause buggy behavior) and will be closed if someone decides to take it on and surpress the warning.

erohmensing avatar Nov 11 '19 09:11 erohmensing

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 09 '20 09:02 stale[bot]

This issue has been automatically closed due to inactivity. Please create a new issue if you need more help.

stale[bot] avatar Feb 16 '20 11:02 stale[bot]

Still valid, IMO

erohmensing avatar Feb 19 '20 12:02 erohmensing

Hi @erohmensing !

I would like to work on this. May I please take this up?

imsaurabh50 avatar Mar 13 '20 05:03 imsaurabh50

HI @MadPr0grammer! Sorry for missing your message. You absolutely can, i'll assign you to the issue.

erohmensing avatar Mar 23 '20 17:03 erohmensing

@erohmensing @tmbo can I take a look at this issue since it’s probably not actively worked on?

UTkzhang avatar Dec 08 '20 23:12 UTkzhang

Totally @UTkzhang. You're right, I haven't seen any PRs around it so should be safe to take up!

erohmensing avatar Dec 11 '20 10:12 erohmensing

@shadow-blade-X Are you still working on this?

TyDunn avatar Jan 28 '21 12:01 TyDunn

Hello.. Im facing the same issue. I have this deployed using a docker. This is my sh file - python -m rasa run actions -p 5055 & python -m rasa run --endpoints endpoints.yml -p 5002 --enable-api --credentials credentials.yml

Can someone please tell me how can handle this error? Thank you

shari-amalgamrx avatar May 31 '22 20:05 shari-amalgamrx

Hi, is this issue still worth resolving?

PedroLucasCM avatar Dec 18 '22 16:12 PedroLucasCM

➤ Maxime Verger commented:

:bulb: Heads up! We're moving issues to Jira: https://rasa-open-source.atlassian.net/browse/OSS.

From now on, this Jira board is the place where you can browse (without an account) and create issues (you'll need a free Jira account for that). This GitHub issue has already been migrated to Jira and will be closed on January 9th, 2023. Do not forget to subscribe to the corresponding Jira issue!

:arrow_right: More information in the forum: https://forum.rasa.com/t/migration-of-rasa-oss-issues-to-jira/56569.

sync-by-unito[bot] avatar Dec 19 '22 12:12 sync-by-unito[bot]