-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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#18512] ERROR - IDF MONITOR #1595
Comments
idf_monitor (and ESP-IDF) is not currently compatible with Python 3. If |
Ok I made the change but when I duanes-mbp:hello_world duanelausellrosado$ make flash I would need to install |
That's right, you'll need to install pyserial with Python 2. The step is probably something like |
I don't understand I used duanes-mbp:hello_world duanelausellrosado$ sudo pip2 install pyserial |
Hi @lausellduane , There seems to be something odd with your computer's Python setup, maybe there are multiple Python installations so for some reason the one "pip2" is using is different to the one "python2" is using. You may be able to help figure it out by running these two terminal commands:
(This will give the full paths to the two executables.) |
@projectgus open to a pull request to port idf_monitor.py to python3? I'm hitting the same issue this guy is seeing but your suggestion to change the default python should fix my issue. The change occurred recently, homebrew changed from symlinking python to python2 to python3. It has been 10 years since python3 was released and there is a big push online to get people off of python2. |
@chmorgan Sorry for the slow reply, I was on leave. Very open to this, provided we can have Py2+3 support together. The only reason we haven't done it ourselves yet is lack of time. There is an open PR #1284 that addresses most of the points for Py3 compatibility, but it still has some issues and seems the original author is no longer working on it. You could use this as a base, or send another PR - either approach is welcome. |
Sorry this wasn't updated earlier. ESP-IDF now supports both Python 2 & 3. |
Please help I'm getting an error with IDF MONITOR and i don't know what is causing it. If someone can help me with this i will greatly appreciate it.
duanes-mbp:hello_world duanelausellrosado$ make monitor
MONITOR
--- idf_monitor on /dev/cu.SLAB_USBtoUART 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
Traceback (most recent call last):
File "/Users/duanelausellrosado/esp/esp-idf/tools/idf_monitor.py", line 622, in
main()
File "/Users/duanelausellrosado/esp/esp-idf/tools/idf_monitor.py", line 545, in main
monitor.main_loop()
File "/Users/duanelausellrosado/esp/esp-idf/tools/idf_monitor.py", line 272, in main_loop
self.handle_serial_input(data)
File "/Users/duanelausellrosado/esp/esp-idf/tools/idf_monitor.py", line 306, in handle_serial_input
self.console.write_bytes(b)
File "/Users/duanelausellrosado/anaconda/lib/python3.6/site-packages/serial/tools/miniterm.py", line 63, in write_bytes
self.byte_output.write(byte_string)
TypeError: a bytes-like object is required, not 'int'
make: *** [monitor] Error 1
The text was updated successfully, but these errors were encountered: