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

[Bug Report]: v0.6.0 monitor not work on windows 10 (VSC-547) #293

Closed
3 tasks done
dangbinghoo opened this issue Jan 15, 2021 · 1 comment
Closed
3 tasks done

[Bug Report]: v0.6.0 monitor not work on windows 10 (VSC-547) #293

dangbinghoo opened this issue Jan 15, 2021 · 1 comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) duplicate This issue or pull request already exists

Comments

@dangbinghoo
Copy link

dangbinghoo commented Jan 15, 2021

Pre Bug Report Checklist
Before reporting any bug please make sure of these points.

  • Make sure you have searched for existing bugs and features request before you post an issue.
  • This is a bug report for the ESP-IDF Visual Studio Code extension and not an ESP-IDF bug report.
  • I've read the docs and found no information that could have helped solving the issue.

Describe the bug
click monitor button, the powershell involked, but leases in shell, nothing show with COM port openning.

To Reproduce
just click monitor button, os is windows 10.

Expected behavior
monitor should open the com port and show running info from esp32 board.

Environment (please complete the following information):

  • OS Name & Version: [e.g. MacOS X 10.14.5]
  • VSCode Version: [e.g. 1.35.1]
  • ESP-IDF Version: [e.g. v3.2.2]
  • Python Version: [e.g. 2.7.10]

Logs

when clicking monitor buttion in vscode, info recored in logfile as bellow:

{"message":"non zero exit code 2\r\n\r\n����: "path:pattern" ��ָ������Ч��ģʽ��\r\n","stack":"Error: non zero exit code 2\r\n\r\n����: "path:pattern" ��ָ������Ч��ģʽ��\r\n\n\tat ChildProcess. (c:\Users\dbh\.vscode\extensions\espressif.esp-idf-extension-0.6.0\dist\extension.js:1:5233)\n\tat ChildProcess.emit (events.js:223:5)\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)","level":"error","timestamp":"2021-01-15T03:00:47.470Z"}
{"message":"Cannot access filePath: C:\Users\dbh\esp\espressif_tools\python_env\idf4.1_py3.9_env\Scripts\python.exe","level":"error","timestamp":"2021-01-15T03:00:47.470Z"}
{"message":"non zero exit code 2\r\n\r\n����: "path:pattern" ��ָ������Ч��ģʽ��\r\n","stack":"Error: non zero exit code 2\r\n\r\n����: "path:pattern" ��ָ������Ч��ģʽ��\r\n\n\tat ChildProcess. (c:\Users\dbh\.vscode\extensions\espressif.esp-idf-extension-0.6.0\dist\extension.js:1:5233)\n\tat ChildProcess.emit (events.js:223:5)\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)","level":"error","timestamp":"2021-01-15T03:01:03.475Z"}
{"message":"Cannot access filePath: C:\Users\dbh\esp\espressif_tools\python_env\idf4.1_py3.9_env\Scripts\python.exe","level":"error","timestamp":"2021-01-15T03:01:03.475Z"}

Additional context
when click monitor buttion, the powershell just output this and stopped.

PS C:\Users\dbh\Desktop\ESPrj\template-app> C:\Users\dbh\esp\espressif_tools\python_env\idf4.1_py3.9_env\Scripts\python.exe C:\Users\dbh\esp\esp-idf\tools\idf.py -p COM6 monitor
Traceback (most recent call last):
File "C:\Users\dbh\esp\esp-idf\tools\idf.py", line 775, in
main()
File "C:\Users\dbh\esp\esp-idf\tools\idf.py", line 691, in main
checks_output = check_environment()
File "C:\Users\dbh\esp\esp-idf\tools\idf.py", line 64, in check_environment
print_idf_version()
File "C:\Users\dbh\esp\esp-idf\tools\idf.py", line 113, in print_idf_version
version = idf_version()
File "C:\Users\dbh\esp\esp-idf\tools\idf_py_actions\tools.py", line 53, in idf_version
version = subprocess.check_output([
File "C:\Devel\Python\Python39\lib\subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Devel\Python\Python39\lib\subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Devel\Python\Python39\lib\subprocess.py", line 947, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Devel\Python\Python39\lib\subprocess.py", line 1416, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] system

-------------------- click monitor button again ------------------------------------

PS C:\Users\dbh\Desktop\ESPrj\template-app> $Env:Path = "

$Env:IDF_PATH = "
PS C:\Users\dbh\Desktop\ESPrj\template-app> $Env:IDF_TARGET = "
$Env:PYTHON = "
PS C:\Users\dbh\Desktop\ESPrj\template-app> $Env:IDF_PYTHON_ENV_PATH = "
cls
C:\Users\dbh\esp\espressif_tools\python_env\idf4.1_py3.9_env\Scripts\python.exe C:\Users\dbh\esp\esp-idf\tools\idf.py -p COM6 monitor

=======================================
After setting IDF_PATH and added cmake bin path in User's env. and run the failed command in a new powershell, this happens:

PS C:\Users\dbh\Desktop\ESPrj\template-app> C:\Users\dbh\esp\espressif_tools\python_env\idf4.1_py3.9_env\Scripts\python.exe C:\Users\dbh\esp\esp-idf\tools\idf.py -p COM6 monitor
Executing action: monitor
Running idf_monitor in directory c:\users\dbh\desktop\esprj\template-app
Executing "C:\Users\dbh\esp\espressif_tools\python_env\idf4.1_py3.9_env\Scripts\python.exe C:\Users\dbh\esp\esp-idf\tools/idf_monitor.py -p COM6 -b 115200 --toolchain-prefix xtensa-esp32-elf- c:\users\dbh\desktop\esprj\template-app\build\template-app.elf -m 'C:\Users\dbh\esp\espressif_tools\python_env\idf4.1_py3.9_env\Scripts\python.exe' 'C:\Users\dbh\esp\esp-idf\tools\idf.py' '-p' 'COM6'"...
--- idf_monitor on COM6 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 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:6940
load:0x40078000,len:13072
xtensa-esp32-elf-addr2line -pfiaC -e c:\users\dbh\desktop\esprj\template-app\build\template-app.elf 0x40078000: [WinError 2]
Traceback (most recent call last):
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 643, in lookup_pc_address
translation = subprocess.check_output(cmd, cwd=".")
File "C:\Devel\Python\Python39\lib\subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Devel\Python\Python39\lib\subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Devel\Python\Python39\lib\subprocess.py", line 947, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Devel\Python\Python39\lib\subprocess.py", line 1416, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 966, in
main()
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 870, in main
monitor.main_loop()
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 517, in main_loop
self.handle_serial_input(data)
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 560, in handle_serial_input
self.handle_possible_pc_address_in_line(line)
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 590, in handle_possible_pc_address_in_line
self.lookup_pc_address(m.group())
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 647, in lookup_pc_address
red_print("%s: %s" % (" ".join(cmd), e))
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 98, in red_print
color_print(message, ANSI_RED)
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 90, in color_print
sys.stderr.write("%s%s%s\n" % (color, message, ANSI_NORMAL))
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 954, in write
self._output_write(b)
File "C:\Users\dbh\esp\esp-idf\tools\idf_monitor.py", line 912, in _output_write
self.output.write(data.decode())
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 in position 0: unexpected end of data
idf_monitor failed with exit code 1

------------------- and I have checked that template-app.elf{,bin,map} is all there in place.

@dangbinghoo dangbinghoo added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Jan 15, 2021
@github-actions github-actions bot changed the title [Bug Report]: v0.6.0 monitor not work on windows 10 [Bug Report]: v0.6.0 monitor not work on windows 10 (VSC-547) Jan 15, 2021
@brianignacio5
Copy link
Collaborator

brianignacio5 commented Jan 15, 2021

Have you check if user has access to python path in C:\Users\dbh\esp\espressif_tools\python_env\idf4.1_py3.9_env\Scripts\python.exe ?

The $Env:Path = " is a duplicated of #280 already fixed in GitHub master and will be released on marketplace in v0.6.1

@brianignacio5 brianignacio5 added the duplicate This issue or pull request already exists label Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants