ESPLORER unable to run a proper main.py file ...
ESPLORER unable to run a proper main.py file ...
Hello,
I am kind of lost and spent hours on trying to get ESPLORER execute a proper main.py file on my ESP8266 (MicroPython 1.8.5).
As long as I call the MicroPython interpreter, it works quite well, but ESPLORER definitely refuses to 'DOFILE' a quite simple main.py script !!!
ESPLORER always returns me :
> dofile("main.py")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'dofile' is not defined
Please watch the 3 following pics :
https://dl.dropboxusercontent.com/u/298 ... s/mpf1.jpg
https://dl.dropboxusercontent.com/u/298 ... s/mpf2.jpg
https://dl.dropboxusercontent.com/u/298 ... s/mpf3.jpg
Thanks for any help.
I am kind of lost and spent hours on trying to get ESPLORER execute a proper main.py file on my ESP8266 (MicroPython 1.8.5).
As long as I call the MicroPython interpreter, it works quite well, but ESPLORER definitely refuses to 'DOFILE' a quite simple main.py script !!!
ESPLORER always returns me :
> dofile("main.py")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'dofile' is not defined
Please watch the 3 following pics :
https://dl.dropboxusercontent.com/u/298 ... s/mpf1.jpg
https://dl.dropboxusercontent.com/u/298 ... s/mpf2.jpg
https://dl.dropboxusercontent.com/u/298 ... s/mpf3.jpg
Thanks for any help.
Re: ESPLORER unable to run a proper main.py file ...
Well, that's quite correct, there is no "dofile" function defined.
Re: ESPLORER unable to run a proper main.py file ...
I think Esplorer is faaaar from updated to support to micropython. dofile() is a LUA NodeMCU function which is not suited for micropython. In other words forget it...
If you browse the forum, you'll discover much more effective ways to develop with micropython and target devices like ESP8266. You can choose from GUI to CLI to install and check your applications. Enjoy!
If you browse the forum, you'll discover much more effective ways to develop with micropython and target devices like ESP8266. You can choose from GUI to CLI to install and check your applications. Enjoy!
Re: ESPLORER unable to run a proper main.py file ...
Just to name a few:
rshell (from dhylands)
webrepl (from paul & damien)
ampy (adafruit)
mu editor (?)
pymakr (last, not least) (pycom.io)
.. more, whco do not come to my mind at the moment
rshell (from dhylands)
webrepl (from paul & damien)
ampy (adafruit)
mu editor (?)
pymakr (last, not least) (pycom.io)
.. more, whco do not come to my mind at the moment
Re: ESPLORER unable to run a proper main.py file ...
Thanks to all !
I'll check other options than ESPlorer from now on ...
I'll check other options than ESPlorer from now on ...
Re: ESPLORER unable to run a proper main.py file ...
Hello together,
I have the same issue as ym58 ... well ... pls. excuse ... but I am not fully "happy" with the replies.
1) ESPlorer is uploading the main.py on the ESP8266. The file is there. Based on the micropython documentation I thought main.py files would be automatically executed after the ESP8266 has booted (1st boot.py, then main.py). --> this doesn't happen.
@ym58: can you confirm, that your main.py is stored on the ESP8266, but doesn't start autmatically after a reboot?
2) I tested all the named IDEs/editors and ESPlorer is the only one I can really work with (I am on an Arch Linux machine)
- rshell -> seems to be a CLI only. With ESPlorer I can write code and send it in total or line by line to the ESP8266; Also a GUI is just nicer;
- ampy -> also seem sto be a CLI interface only.
- mu editor -> doesn't connect to my UART ... and there is nowhere a setting option, e.g. to determine the USB interface, set the baud-rate etc.
- pymakr -> I couldn't find the source code and there doesn't seem to be a package for Arch Linux (only debian and red hat).
==> So this leave me with ESPlorer.
But again. That the main.py doesn't start directly from ESPlorer is only a minor issue. Why isn't main.py not starting after the reboot?
I have the same issue as ym58 ... well ... pls. excuse ... but I am not fully "happy" with the replies.
1) ESPlorer is uploading the main.py on the ESP8266. The file is there. Based on the micropython documentation I thought main.py files would be automatically executed after the ESP8266 has booted (1st boot.py, then main.py). --> this doesn't happen.
@ym58: can you confirm, that your main.py is stored on the ESP8266, but doesn't start autmatically after a reboot?
2) I tested all the named IDEs/editors and ESPlorer is the only one I can really work with (I am on an Arch Linux machine)
- rshell -> seems to be a CLI only. With ESPlorer I can write code and send it in total or line by line to the ESP8266; Also a GUI is just nicer;
- ampy -> also seem sto be a CLI interface only.
- mu editor -> doesn't connect to my UART ... and there is nowhere a setting option, e.g. to determine the USB interface, set the baud-rate etc.
- pymakr -> I couldn't find the source code and there doesn't seem to be a package for Arch Linux (only debian and red hat).
==> So this leave me with ESPlorer.
But again. That the main.py doesn't start directly from ESPlorer is only a minor issue. Why isn't main.py not starting after the reboot?
Re: ESPLORER unable to run a proper main.py file ...
If main.py is in the root directory, it will start. Do you see it, when in REPL you issue:
The pymakr source code is here: https://github.com/pycom/Pymakr
For file exchange with esp8266, you can also use ftp clients, once you managed to upload this sever to esp8266 (better put it in flash). https://github.com/robert-hh/ESP8266-FTP-Server
A prebuild esp8266 image with installed ftp is here: https://github.com/robert-hh/Shared-Stuff
Code: Select all
import uos
uos.listdir()
For file exchange with esp8266, you can also use ftp clients, once you managed to upload this sever to esp8266 (better put it in flash). https://github.com/robert-hh/ESP8266-FTP-Server
A prebuild esp8266 image with installed ftp is here: https://github.com/robert-hh/Shared-Stuff
Re: ESPLORER unable to run a proper main.py file ...
I will double-check the day after tomorrow, and will post the results (currently I am bit to busy with the work I am getting paid for )Roberthh wrote:If main.py is in the root directory, it will start. Do you see it, when in REPL you issue:Code: Select all
import uos uos.listdir()
... unfortunately the installation results in "an internal error". I already send this to support@pycom.ioRoberthh wrote: The pymakr source code is here: https://github.com/pycom/Pymakr
Don't get me wrong: I highly appreciate open-source and for me the people investing their time in such applications are heros in my eyes!
Good point. I will keep in mind.Roberthh wrote: For file exchange with esp8266, you can also use ftp clients, once you managed to upload this sever to esp8266 (better put it in flash). https://github.com/robert-hh/ESP8266-FTP-Server
A prebuild esp8266 image with installed ftp is here: https://github.com/robert-hh/Shared-Stuff
Re: ESPLORER unable to run a proper main.py file ...
update: okay, an upload of a file from ESplorer to the ESP8266 is really not working fine. Although ESPlorer wrote a file to the ESP8266 it was empty (I checked with f=open('<filename>'), f.read() -> Results '').
So I gave rshell a try: well I can connect to my ESP8266 and even access repl ... but how to upload a file on my ESP8266? https://github.com/dhylands/rshell speaks about copying files to /flash ... can it be that rshell only works with the pyboard? I don't have the pyboard. I'm working with a "bare" ESP8266 .... so rshell is dead. Also Pymakr, which even after two days I couldn't install on my Arch Linux system.
So I gave rshell a try: well I can connect to my ESP8266 and even access repl ... but how to upload a file on my ESP8266? https://github.com/dhylands/rshell speaks about copying files to /flash ... can it be that rshell only works with the pyboard? I don't have the pyboard. I'm working with a "bare" ESP8266 .... so rshell is dead. Also Pymakr, which even after two days I couldn't install on my Arch Linux system.
Re: ESPLORER unable to run a proper main.py file ...
I understand that you "really" want ESPlorer to work with micropython. You should probably contact the author of the program https://esp8266.ru/esplorer/
As far as I can tell it is NOT working properly with micropython. To me is a deprecated tool that should not be considered for micropython development. If you manage to get it working please inform the forum of the current status. I will reconsider my position.
Thanks
As far as I can tell it is NOT working properly with micropython. To me is a deprecated tool that should not be considered for micropython development. If you manage to get it working please inform the forum of the current status. I will reconsider my position.
Thanks