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

[TW#15969] make monitor Error 1 #1136

Closed
sigwinch28 opened this issue Oct 18, 2017 · 11 comments
Closed

[TW#15969] make monitor Error 1 #1136

sigwinch28 opened this issue Oct 18, 2017 · 11 comments
Assignees

Comments

@sigwinch28
Copy link

After following the install guide for Windows on a Windows 10 64-bit machine, I receive an error when attempting to run make monitor after flashing the hello_world.

I installed the IDF via the "from scratch" method for Windows and the monitor was previously working, but I can't figure out what's changed:

$ make monitor
MONITOR
--- idf_monitor on COM3 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (S
Traceback (most recent call last):
  File "C:/msys32/home/Joe/esp/esp-idf/tools/idf_monitor.py", line 568, in <module>
    main()
  File "C:/msys32/home/Joe/esp/esp-idf/tools/idf_monitor.py", line 502, in main
    monitor.main_loop()
  File "C:/msys32/home/Joe/esp/esp-idf/tools/idf_monitor.py", line 269, in main_loop
    self.handle_serial_input(data)
  File "C:/msys32/home/Joe/esp/esp-idf/tools/idf_monitor.py", line 300, in handle_serial_input
    self.console.write_bytes(b)
  File "C:/msys32/mingw32/lib/python2.7/site-packages/serial/tools/miniterm.py", line 63, in write_bytes
    self.byte_output.write(byte_string)
  File "C:/msys32/home/Joe/esp/esp-idf/tools/idf_monitor.py", line 560, in write
    self.output.write(b)
IOError: [Errno 0] Error
make: *** [/home/Joe/esp/esp-idf/components/esptool_py/Makefile.projbuild:96: monitor] Error 1
@projectgus
Copy link
Contributor

The IOError is a Windows-level OS error. I get similar errors if the USB connection is flaky, or the USB/Serial chip is browning out and resetting.

If the same board has previously worked in the same situation, try swapping out the USB cable.

@sigwinch28
Copy link
Author

sigwinch28 commented Oct 19, 2017

Tried a different board, different USB cable, and different USB port. The problem still occurs with different boards, too.

Edit: Just used a multimeter and I'm getting a solid, stable 5V.
Edit2: PuTTY works fine.

@FayeY FayeY changed the title make monitor Error 1 [TW#15969] make monitor Error 1 Oct 23, 2017
@adamt80
Copy link

adamt80 commented Oct 24, 2017

Same issue here on Win 10 64bit. Worked fine about a week ago with the same board, USB port, and cable. Now I get this error 100% of the time with any code for make monitor. The serial monitor in Arduino IDE and Putty work fine for monitoring.

@sigwinch28
Copy link
Author

@adamt80 Have you done the Fall Creator's Update on that machine? My machines have the update.

@adamt80
Copy link

adamt80 commented Oct 25, 2017

@sigwinch28 Yes. Both my machines have the update as well. Probably related because I undid the last couple monitor changes and the issue persists.

Update:
make simple_monitor works fine as well, but doesn't decode the dumps.

@logmanPL
Copy link

logmanPL commented Nov 1, 2017

Windows update is definitely responsible for this. I have no issues just before it and after I have same error as you. Quick and ugly fix:
in idf_monitor.py line 560 change

					self.output.write(b)
					self.matched = b''

to

					try:
						self.output.write(b)
						self.matched = b''
					except:
						pass

@zachjacobs
Copy link

I came here to say that I had the same issue after installing the Fall Creator's Update and @logmanPL 's workaround allowed me to debug. Thanks!

@dconyers
Copy link

dconyers commented Nov 9, 2017

Just another quick confirmation that I encountered the issue immediately upon installing the Fall Creator's Update and @logmanPL 's post saved the day for me as well, thank you!

@baoshi
Copy link

baoshi commented Nov 18, 2017

I have this issue too after Win10 update. simple_monitor gives me same error occasionally too. Wonder esp-idf is to blame or pyserial.

@projectgus
Copy link
Contributor

Hi folks,

Sorry for the slow turnaround on this. I (finally) got my Windows 10 box updated to Fall Creators Update and saw the exact same issue.

The bug is, oddly enough, in the console display output handling rather than anything to do with serial. It appears to be timing related, somehow.

Fix coming shortly (very similar to @logmanPL's above, only I noticed that retrying the write() always seems to succeed so doing this instead.)

@igrr igrr closed this as completed in 19598fa Nov 27, 2017
@projectgus
Copy link
Contributor

Fix coming shortly (very similar to @logmanPL's above, only I noticed that retrying the write() always seems to succeed so doing this instead.)

Seems like this is not always the case:
https://esp32.com/viewtopic.php?f=13&t=3920&p=17795#p17795

@projectgus projectgus reopened this Dec 13, 2017
@projectgus projectgus self-assigned this Dec 13, 2017
igrr pushed a commit that referenced this issue Dec 18, 2017
…lso fails

Although in my tests the second write always passes, people have reported
different results.

Closes #1136 (again)
@igrr igrr closed this as completed in b62e5a4 Dec 18, 2017
dburnier added a commit to e-puck2/esp-idf that referenced this issue Dec 18, 2017
igrr pushed a commit that referenced this issue Feb 27, 2018
…wice

Turns out when IOError is thrown by the console, the character is
also successfully displayed.

Revisits fix from #1136

As reported https://esp32.com/viewtopic.php?f=14&t=4766&p=20637
dschaefer pushed a commit to dschaefer/esp-idf that referenced this issue Mar 17, 2018
…wice

Turns out when IOError is thrown by the console, the character is
also successfully displayed.

Revisits fix from espressif#1136

As reported https://esp32.com/viewtopic.php?f=14&t=4766&p=20637
espressif-bot pushed a commit to espressif/esp-idf-monitor that referenced this issue Jan 16, 2023
espressif-bot pushed a commit to espressif/esp-idf-monitor that referenced this issue Jan 16, 2023
…lso fails

Although in my tests the second write always passes, people have reported
different results.

Closes espressif/esp-idf#1136 (again)
espressif-bot pushed a commit to espressif/esp-idf-monitor that referenced this issue Jan 16, 2023
…wice

Turns out when IOError is thrown by the console, the character is
also successfully displayed.

Revisits fix from espressif/esp-idf#1136

As reported https://esp32.com/viewtopic.php?f=14&t=4766&p=20637
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

7 participants