Chat about current Lua tools and IDEs

User avatar
By alonewolfx2
#5824 i tried your tool its working but i am giving error message everytime. its hanging "stdin:1: unexpected symbol near '~'" and i must use ctrl+c interrupt. what am i missing? i can upload same file with luatool.py

Code: Select all~~END~~
stdin:1: unexpected symbol near '~'
>
Traceback (most recent call last):
  File "C:\luatool\uploader.py", line 75, in <module>
    print read_till_prompt()
  File "C:\luatool\uploader.py", line 33, in read_till_prompt
    data += ser.read()
  File "C:\Python27\lib\site-packages\serial\serialwin32.py", line 271, in read
    err = win32.GetOverlappedResult(self.hComPort, ctypes.byref(self._overlapped
Read), ctypes.byref(rc), True)
KeyboardInterrupt
User avatar
By Markus Gritsch
#5825 It seems that running your uploaded script with the dofile() at the end of uploader.py causes your NodeMcu to reboot, and thus read_till_prompt() never receives any input anymore and waits forever.

Try commenting out the call to dofile() and the read_till_prompt() so that the end of uploader.py looks like this:
Code: Select all# ser.write('cat("%s")\r' % file_name)
# print read_till_prompt()
# ser.write('dofile("%s")\r' % file_name)
# print read_till_prompt()

ser.close()

This should fix your problem. Please verify if calling dofile() from the interactive prompt of LuaLoader reboots the interpreter.
User avatar
By alonewolfx2
#5828 i am using something like this.
Code: Select allprint
ser.write('~~END~~\r')
print read_till_prompt()

# ser.write('cat("%s")\r' % file_name)
#print read_till_prompt()
#ser.write('print(node.heap())')
#print read_till_prompt()

ser.close()
sys.stderr.write("\r\n--->>> All down <<<---\r\n")
sys.exit()
its working fine but what is the error message?
Code: Select all~~END~~
stdin:1: unexpected symbol near '~'
file cant close if i change with this
Code: Select all~~END~