Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to GET a non-existent file crashes webrepl on device #27

Open
ARF1 opened this issue Feb 18, 2017 · 1 comment
Open

Attempting to GET a non-existent file crashes webrepl on device #27

ARF1 opened this issue Feb 18, 2017 · 1 comment

Comments

@ARF1
Copy link

ARF1 commented Feb 18, 2017

If one attempts to GET a non-existent file, the webrepl connection crashes. (It disconnects.)

On the UART the following message is printed:
dupterm: Exception in read() method, deactivating: OSError: [Errno 2] ENOENT

Catching invalid filenames (i.e. typos) is probably a must-have feature if non-experts are a target user-group for the webrepl.

I have been looking into the issue and my best guess seems is this line requires catching an exception or verification that the file could be opened.

That said, I am not sure what read() method micropython is talking about. Is there any way of making such error messages a bit more explicit? I.e. by mentioning the object/class that defines the method mentioned?

@pfalcon
Copy link
Contributor

pfalcon commented Feb 18, 2017

Is there any way of making such error messages a bit more explicit? I.e. by mentioning the object/class that defines the method mentioned?

No. But such errors indeed should be caught and communicated back to client instead of terminating current webrepl connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants