Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Xcess
#61334 Hi,

I have been using the following very basic code:
file.open("1.txt","w")
file.writeline("this is a test")
file.close()

It used to be just fine. I have been using ESP-12 from AI-THINKER. I got a new ESP-12S and the same code starts to break. The symptom is like this, the first time this code runs. No error at all, but the 1.txt doesn't created! Then I ran the same code again, this time the file.writeline("this is a test") will output the error:

stdin:1: open a file first.

Any ideas?

Thanks in advanced!
User avatar
By RichardS
#61387 I had similar issues, then I added / before the filename /1.txt and all OK.....

RichardS