-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
file.read() causes reboot #1592
Comments
When using the returned file object, you need to either use the
or
This is the way Lua works with "objects", it's not something NodeMCU specific. See e.g. https://www.lua.org/pil/16.html |
Thank you for clarifying the correct use of the new object model for files (which was recently merged into the dev branch #1532). Unfortunately I have to report that both suggested ways fail the same way as before (dev branch). In the master branch the following commands work without a problem:
In the dev branch I get a reboot at the read command. As previously described a read on a non empty file (after EOF has been reached) also causes a reboot.
|
The symptoms look strange, I'll have a look later that day. |
I can confirm that #1599 fixed the issue. Thank you. |
According to the documentation file.read() should:
But when I try:
The same happens on an empty file:
Version used:
The text was updated successfully, but these errors were encountered: