mu editor for micropython

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor for micropython

Post by pythoncoder » Thu Oct 13, 2016 7:59 am

This build doesn't recognise my Feather Huzzah reference board (my fork does) so something seems to have gone adrift here. I'm testing under Linux Mint 17.1 'rebecca'. I've raised an issue.

I submitted a PR upstream, which was accepted, to fix the issue where dialog boxes are not modal - you don't seem to have incorporated this fix. Is there any particular reason?

For what it's worth I'd be more than happy to abandon my fork and leave mu to you once these niggles are fixed.

You might like to consider a minor UI point which I raised upstream as a suggestion but wasn't taken up. Currently, if you click on REPL when files are displayed, or vice versa, you get a dialog box explaining why it can't do this. An alternative UI which I use and prefer is implemented in my fork; it works as follows. If you have the REPL up and click files, the REPL disappears. A second click on files brings up the files pane. This is of course symmetrical.
Peter Hinch
Index to my micropython libraries.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor for micropython

Post by pythoncoder » Fri Oct 14, 2016 6:12 am

Has anyone had success with this release using a serial or USB connection with an ESP8266?
Peter Hinch
Index to my micropython libraries.

kromosom
Posts: 2
Joined: Fri Oct 21, 2016 11:09 am

Re: mu editor for micropython

Post by kromosom » Fri Oct 21, 2016 9:55 pm

[quote="pythoncoder"]Has anyone had success with this release using a serial or USB connection with an ESP8266?[/quote]

It works for me with Feather Huzzah. On both Windows and Ubuntu.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor for micropython

Post by pythoncoder » Sat Oct 22, 2016 5:58 am

Interesting. I did a fresh clone of the repo just now and it still won't recognise the Feather Huzzah. My fork does. One odd thing is that the repo does not contain the file config.py which is referenced in the docs. However my fork doesn't have this file either.

Alas I'm busy with other things at the moment. My suggestion to ESP8266 users is to try it. If it fails to recognise your board, give my hacked version a try. Mine was only intended as a stopgap to patch a few simple issues until @askvictor had a chance to address them.
Peter Hinch
Index to my micropython libraries.

kromosom
Posts: 2
Joined: Fri Oct 21, 2016 11:09 am

Re: mu editor for micropython

Post by kromosom » Sat Oct 22, 2016 7:00 pm

@pythoncoder if you don't have config.py in subdirectory mu then you are probably cloning the wrong branch
try this command to clone the feature/multi-board branch: git clone -b feature/multi-board https://github.com/eduvik/mu.git

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor for micropython

Post by pythoncoder » Sun Oct 23, 2016 8:10 am

Thanks for that, my git-fu is still a bit flaky. I edited config.py to match my setup but alas the code still fails with

Code: Select all

[adminpete@axolotl]: ~/eduvik/mu
$ ./run.py 
Traceback (most recent call last):
  File "./run.py", line 2, in <module>
    from mu.app import run
  File "/home/adminpete/eduvik/mu/mu/app.py", line 27, in <module>
    from mu.logic import Editor, LOG_FILE, LOG_DIR
  File "/home/adminpete/eduvik/mu/mu/logic.py", line 39, in <module>
    from mu.upython_device import get_upython_device
  File "/home/adminpete/eduvik/mu/mu/upython_device.py", line 5, in <module>
    from PyQt5 import QtSerialPort, QtWebSockets
ImportError: cannot import name 'QtWebSockets'
[adminpete@axolotl]: ~/eduvik/mu

My attempt to get the latest version of python3-pyqt5 indicates that I do in fact have the latest version. After an apt-get update:

Code: Select all

axolotl mu # apt-get install --only-upgrade python3-pyqt5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pyqt5 is already the newest version.
I have raised an issue.
Peter Hinch
Index to my micropython libraries.

pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: mu editor for micropython

Post by pfalcon » Tue Nov 01, 2016 1:04 am

Here's some little feedback from me. One picture is worth a hundred words. Adding a screenshot to the README would help some users to not pass by. I also had problems with QtWebSockets - ubuntu 14.04 doesn't seem to have it in packages. So, I had to patch it out. I'd suggest to import it only when websocket communication is really needed, and have "oops" dialog.

It's also a bit strange that mu-multi-board is a GUI tool, but needs to be configured by editing a config file and doesn't allow to specify connection port from GUI.

All in all, great work! (And I just got curious why there 5-6 IDE-like tools, and new appear all the time, instead of interested parties to get together and work on one.)
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor for micropython

Post by pythoncoder » Tue Nov 01, 2016 6:16 am

pfalcon wrote:...needs to be configured by editing a config file...
This is a regression. @askvictor's early version (which I hacked to support control characters at the REPL) reliably auto-detects ESP8266 boards of various types.

I agree there are many competing options, but a way of transferring files by USB is handy. Its visual Python style checker is nice although not as comprehensive as Pylint.
Peter Hinch
Index to my micropython libraries.

Best
Posts: 1
Joined: Sat Nov 12, 2016 2:29 pm

Re: mu editor for micropython

Post by Best » Sat Nov 12, 2016 2:32 pm

Hi,
I'm having some difficulties getting this to run. I tried on ubuntu 14 but there were too many broken dependencies. I then tried on ubuntu 16 but it keeps crashing with a segmentation fault when trying to run. I'm using the feature/multi-board branch. Not sure what else to try to get it to work.

With the DNU Debugger I get the following:
Error Received
vagrant@vagrant:~/Desktop/mu$ sudo python3 run.py
Logging to /home/vagrant/.cache/mu/log/mu.log
Segmentation fault (core dumped)
vagrant@vagrant:~/Desktop/mu$ cat /home/vagrant/.cache/mu/log/mu.log
root(run) INFO: Starting Mu 0.9.11
mu.logic(__init__) INFO: Setting up editor.
vagrant@vagrant:~/Desktop/mu$

gbd
Starting program: /usr/bin/python3 run.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Logging to /home/vagrant/.cache/mu/log/mu.log
[New Thread 0x7fffe95ed700 (LWP 4638)]
[New Thread 0x7fffe3fff700 (LWP 4639)]
[New Thread 0x7fffe1177700 (LWP 4641)]
[New Thread 0x7fffe0976700 (LWP 4642)]
[Thread 0x7fffe1177700 (LWP 4641) exited]
[New Thread 0x7fffe1177700 (LWP 4644)]
[Thread 0x7fffe1177700 (LWP 4644) exited]
[New Thread 0x7fffe1177700 (LWP 4645)]

Thread 7 "QThread" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe1177700 (LWP 4645)]
0x00007ffff49fb558 in vtable for __cxxabiv1::__si_class_type_info ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0 0x00007ffff49fb558 in vtable for __cxxabiv1::__si_class_type_info ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007fffec6d4c34 in QsciAPIsWorker::run() ()
from /home/vagrant/.local/lib/python3.5/site-packages/PyQt5/Qsci.so
#2 0x00007ffff4ab45f9 in ?? ()
from /home/vagrant/.local/lib/python3.5/site-packages/PyQt5/Qt/lib/libQt5Core.so.5
#3 0x00007ffff7bc170a in start_thread (arg=0x7fffe1177700)
at pthread_create.c:333
#4 0x00007ffff78f782d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor for micropython

Post by pythoncoder » Sat Nov 12, 2016 4:44 pm

Have you tried my fork/hack https://github.com/peterhinch/mu.git? It's the only way I can get it to run. Dependencies are in the README. As you're running Linux it should run. Good luck ;)
Peter Hinch
Index to my micropython libraries.

Post Reply