Mu Editor

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
drnow
 
Posts: 3
Joined: Fri Nov 18, 2022 2:38 pm

Mu Editor

Post by drnow »

Mu Editor fails to load and run properly on my computer (Lenovo Laptop, with Windows 10). Can you recommend another python editor?

User avatar
blakebr
 
Posts: 942
Joined: Tue Apr 17, 2012 6:23 pm

Re: Mu Editor

Post by blakebr »

Hello,

I use notepad++ for my editor and Putty for REPL access.

Bruce

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: Mu Editor

Post by danhalbert »

Note that NotePad++ does not write out changes immediately. Here is a list of recommended editors: https://learn.adafruit.com/welcome-to-c ... ed-editors. Thonny or VSCode might be good for you.

How does Mu not work for you, and which version are you using, with which board?

User avatar
drnow
 
Posts: 3
Joined: Fri Nov 18, 2022 2:38 pm

Re: Mu Editor

Post by drnow »

The Mu Editor would not run (giving an error message). Mu Editor version 1.2.0. I never hooked it up to a board (I have the ItsyBitsy MO Express board) because it never ran.

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: Mu Editor

Post by danhalbert »

What error message did it give? You could also search the issues https://github.com/mu-editor/mu/issues and see if someone else has a similar problem.

User avatar
blakebr
 
Posts: 942
Joined: Tue Apr 17, 2012 6:23 pm

Re: Mu Editor

Post by blakebr »

Dan,

I tried to reinstall Mu 1.2.0, to test it, twice, it failed to install twice. I submitted a bug report to git.
Windows 10, Intel Core i3, all updates installed, Norton AV.
Note that NotePad++ does not write out changes immediately.
What do you mean by that? When I click Save or Save All on NotePad++ v8.4.7 everything appears to have been saved to my RP2040 device(s) and my CP code runs. What am I missing? What should I be looking for?

Bruce

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: Mu Editor

Post by danhalbert »

When you write to the USB drive in Windows, without doing a "flush to the device", the written pages may not be written to the USBdrive right away. Instead, changes are accumulated ("cached"), and then written all at once. To you, it appears that the changes are there, and if you try to read from the drive, Windows will read from the changes. But the data may not physically be written to the drive for a while. This is mentioned at the top of the Learn Guide page I linked to above.

User avatar
blakebr
 
Posts: 942
Joined: Tue Apr 17, 2012 6:23 pm

Re: Mu Editor

Post by blakebr »

Dan,

If I understand what you are saying, When I click on Save the updated file is written to a buffer and then at some undefined future time the file is written to the USB drive (Raspberry Pi Nano W, etc.). I have not experienced what you describe.

I have experienced two scenarios:
1) I click Save and the program is running or the program is sitting at the Press any key to enter the REPL. Use CTRL-D to reload. prompt. The code I save immediately starts running

2) I have hit Enter at Press any key to enter the REPL. Use CTRL-D to reload. and looked at something. When I click Save, NotePad++ shows that the code has been saved. The saved code does not run until I hit Ctrl-D in REPL.

There is a possibility that NotePad++ has added a Flush Buffer function to the Save command to recent versions.

If you have a scenario where I can reproduce the issue, I would be happy to test it.

Bruce

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: Mu Editor

Post by danhalbert »

This typically is a problem with larger files, or files that change sizes to be a different number of blocks. That requires an update of the FAT metadata. Small files may get written immediately, because only one block is being written.

In Windows, this issue has a long history: https://superuser.com/questions/1197897 ... al/1203781. It has been worse for FAT12 filesystems than larger filesystem (FAT16 and up). It is probably a leftover of avoiding excessive writes to floppy drives.

At one point, we got the attention of the right people at Microsoft about this. We heard they had fixed it in Windows 10, but only informally. I never found the fix mentioned in Windows 10 release notes. I have not had a chance to test again to see whether the problem is still present. It requires monitoring the actual USB traffic.

User avatar
blakebr
 
Posts: 942
Joined: Tue Apr 17, 2012 6:23 pm

Re: Mu Editor

Post by blakebr »

Dan,

The file I am currently playing/working with is 32K Bytes. I'll keep an eye out looking closely at how things behave.

As an aside, Our local high school competition It's Academic showed a 5-1/4 floppy disk and none of the students identified it. Damn we are old!

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”