wendlers / mpfshell

A simple shell based file explorer for ESP8266 Micropython based devices ⛺
MIT License
396 stars 84 forks source link

couldn't connect via websocket #105

Closed pontius-g closed 2 years ago

pontius-g commented 2 years ago

Hi

Trying to open websocket connection to webrepl, got the following error: TypeError: ConWebsock.on_message() takes 2 positional arguments but 3 were given

it appeared, because there is a websocket object passed first to actual message: (<websocket._app.WebSocketApp object at 0x000002C0B5ADA260>, 'OK')

the following correction of original function .on_mesage() in mp/conwebsock.py at line 75, fixed its behavior:

def on_message(self, *message):
        self.fifo.extend(message[-1])
skorokithakis commented 2 years ago

Thanks for this! Could you open a PR?

pontius-g commented 2 years ago

I could) but I see, there is no need. It was fixed in other way at main branch already. It seams, pip provides an old version and that is why got this issue.

Thanks

skorokithakis commented 2 years ago

Ah, I'll have to make a new release then.