Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get a file from esp32 #2461

Open
uriyay opened this issue Sep 10, 2023 · 0 comments
Open

Can't get a file from esp32 #2461

uriyay opened this issue Sep 10, 2023 · 0 comments

Comments

@uriyay
Copy link

uriyay commented Sep 10, 2023

What were you trying to do?

Copying a file from esp32 to my PC

What steps did you take to trigger the issue?

I tried to copy boot.py to my PC

What did you expect to happen?

The file should succeed writing to the PC

What actually happened?

I got an error, looking at the logs (and adding traceback info to base.py), I got this:

2023-09-10 11:23:36,068 - mu.interface.panes:784(dropEvent) INFO: Getting 'boot.py' from device. Copying to '<some path>\boot.py'.
2023-09-10 11:23:38,564 - mu.modes.base:706(get) ERROR: not enough values to unpack (expected 2, got 1)

2023-09-10 11:32:29,843 - mu.modes.base:708(get) ERROR: Traceback (most recent call last):
  File "C:\Users\Uriya\AppData\Local\Programs\Mu Editor\Python\lib\site-packages\mu\modes\base.py", line 703, in get
    microfs.get(device_filename, local_filename, serial=self.serial)
  File "C:\Users\Uriya\AppData\Local\Programs\Mu Editor\Python\lib\site-packages\mu\contrib\microfs.py", line 273, in get
    out, err = execute(commands, serial)
  File "C:\Users\Uriya\AppData\Local\Programs\Mu Editor\Python\lib\site-packages\mu\contrib\microfs.py", line 149, in execute
    out, err = response[2:-2].split(b"\x04", 1)  # Split stdout, stderr
ValueError: not enough values to unpack (expected 2, got 1)

It seems that the problem is that response doesn't contain '\x04' at all.
Instead it contains the full file content:

ValueError: not enough values to unpack (expected 2, got 1), response = b'OK# This file is executed on every boot (including wake-boot from deepsleep)\n#import esp\n#esp.osdebug(None)\n#import webrepl\n#webrepl.start'

(Got it by adding response var to the exception message).

Perhaps the problem is with this line:

response = serial.read_until(b"\x04>")  # Read until prompt.

That reads until '\x04' not including?
Also, something weird with the "OK" string.
Maybe the problem is that my firmware is not compatible with Mu Editor?

Operating System Version

Windows 11

Mu Version

1.2

Other Info

ESP32 Firmware version: esp32-20230426-v1.20.0
(Downloaded from here

Editor Log

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant