You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It appears while searching for .lib files mbed-tools is able to traverse into tooling folders, namely a co-located virtualenv and attempts to parse invalid .lib files.
The exact traceback is:
> mbed-tools deploy
Checking out all libraries to revisions specified in .lib files. Resolving any unresolved libraries.
Traceback (most recent call last):
File "c:\program files\python38\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\program files\python38\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\myfiles\firmware\.venv\Scripts\mbed-tools.exe\__main__.py", line 7, in <module>
File "d:\myfiles\firmware\.venv\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "d:\myfiles\firmware\.venv\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "d:\myfiles\firmware\.venv\lib\site-packages\mbed_tools\cli\main.py", line 38, in invoke
super().invoke(context)
File "d:\myfiles\firmware\.venv\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "d:\myfiles\firmware\.venv\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "d:\myfiles\firmware\.venv\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "d:\myfiles\firmware\.venv\lib\site-packages\mbed_tools\cli\project_management.py", line 83, in deploy
deploy_project(root_path, force)
File "d:\myfiles\firmware\.venv\lib\site-packages\mbed_tools\project\project.py", line 70, in deploy_project
libs.fetch()
File "d:\myfiles\firmware\.venv\lib\site-packages\mbed_tools\project\_internal\libraries.py", line 65, in fetch
git_ref = lib.get_git_reference()
File "d:\myfiles\firmware\.venv\lib\site-packages\mbed_tools\project\_internal\libraries.py", line 46, in get_git_reference
raw_ref = raw_bytes.decode('utf-8').strip()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 71: invalid start byte
In my case it appears to be parsing the file .venv\Lib\site-packages\win32\libs\pywintypes.lib.
To Reproduce
Create a virtual env in .venv
Install mbed-tools with a local mbed-os.lib file
Run mbed-tools deploy
Expected behavior mbed-tools deploy should execute.
Screenshots
NA
Desktop (please complete the following information):
OS: Windows
Version: 10
Mbed (please complete the following information):
Device: NUCLEO_F767ZI
Mbed OS Version: #4587080dbb470294f623054db2a272f1570be327
Mbed CLI 2 Version: 7.40.0
Additional context
NA
The text was updated successfully, but these errors were encountered:
Why are you using a python virtual environment in your mbed project folder when all the code is in C++? Just store your .venv folder somewhere else or better yet, don't use a virtual environment at all. Problem solved.
Describe the bug
It appears while searching for .lib files mbed-tools is able to traverse into tooling folders, namely a co-located virtualenv and attempts to parse invalid
.lib
files.The exact traceback is:
In my case it appears to be parsing the file
.venv\Lib\site-packages\win32\libs\pywintypes.lib
.To Reproduce
.venv
mbed-os.lib
filembed-tools deploy
Expected behavior
mbed-tools deploy
should execute.Screenshots
NA
Desktop (please complete the following information):
Mbed (please complete the following information):
Additional context
NA
The text was updated successfully, but these errors were encountered: