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
I am trying to use your project to make a cmake file out of a uVision file that was generated from STM32Cube. When I run the main.py script on the project I get the following output:
Using µVision5 Project File 'G:\Users\allenb\Project\tim2_pwm\MDK-ARM\tim2_pwm.uvprojx' Traceback (most recent call last): File "main.py", line 879, in <module> main() File "main.py", line 852, in main uvp = UVisionProject.new(project_path) File "main.py", line 455, in new ) for target in xproj.xpath("Targets/Target") File "main.py", line 455, in <listcomp> ) for target in xproj.xpath("Targets/Target") File "main.py", line 376, in <genexpr> ) for to in target.xpath("TargetOption") File "main.py", line 369, in <genexpr> ) for tco in to.xpath("TargetCommonOption") TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
I have attached the project if that is helpful and would be happy to contribute to debugging however I can.
Quick fix would be to change device_id=int(text(tco, "DeviceId")),
in line 367 to device_id=int(text(tco, "DeviceId")) if text(tco, "DeviceId") else None,.
Thank you for your issue, this project is basically made by trial-and-error, but I only used Nordic nRF5 SDK files for testing (that's what I needed this tool for). I will try to generate a few projects using STM32Cube and update during the week.
Moreover, I also posted to Keil forum in hope to get a useful response and sort it all out systematically.
I am trying to use your project to make a cmake file out of a uVision file that was generated from STM32Cube. When I run the main.py script on the project I get the following output:
Using µVision5 Project File 'G:\Users\allenb\Project\tim2_pwm\MDK-ARM\tim2_pwm.uvprojx'
Traceback (most recent call last):
File "main.py", line 879, in <module>
main()
File "main.py", line 852, in main
uvp = UVisionProject.new(project_path)
File "main.py", line 455, in new
) for target in xproj.xpath("Targets/Target")
File "main.py", line 455, in <listcomp>
) for target in xproj.xpath("Targets/Target")
File "main.py", line 376, in <genexpr>
) for to in target.xpath("TargetOption")
File "main.py", line 369, in <genexpr>
) for tco in to.xpath("TargetCommonOption")
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
I have attached the project if that is helpful and would be happy to contribute to debugging however I can.
problem.zip
The text was updated successfully, but these errors were encountered: