platform-ststm32
platform-ststm32 copied to clipboard
Could not initialize project, Python 3.10+
With Python3.10, they move Iterable object under Collections.abc So im getting error when i initialize project. Is will be fix for it or am i need to use Python3.9 ?
https://pastebin.com/raw/GiQ968XN
same problem
@zayats1 Hey, i fixed my problem with using platformio core. I also patch some package files because im using Python3.10+. Changes: ~ /home/$USER/.platformio/packages/framework-mbed/platformio/package_deps/py3/past/types/oldstr.py Line 5 :
- from collections import Iterable > from collections.abc import Iterable
~ /home/$USER/.platformio/packages/framework-mbed/platformio/package_deps/py3/past/builtins/misc.py Line 4:
- from collections import Mapping > from collections.abc import Mapping
@imsakg Thank you! It works.
I have encountered this issue as well and the easy fix provided by @imsakg worked fine. I suppose the python3 dependencies list should be updated to include the most recent python-future package version (which contains the past package as well), as shown for example here and here?
Python 3.10 has been out for almost a year now, it's probably worth trying to get these fixes into the main release. Is this the right repository for a fix?
@zayats1 Hey, i fixed my problem with using platformio core. I also patch some package files because im using Python3.10+. Changes: ~ /home/$USER/.platformio/packages/framework-mbed/platformio/package_deps/py3/past/types/oldstr.py Line 5 :
* from collections import Iterable > from collections.abc import Iterable
~ /home/$USER/.platformio/packages/framework-mbed/platformio/package_deps/py3/past/builtins/misc.py Line 4:
* from collections import Mapping > from collections.abc import Mapping
After these steps is it necessary any other configuration? I edited the files, however the problem persists
@zayats1 Hey, i fixed my problem with using platformio core. I also patch some package files because im using Python3.10+. Changes: ~ /home/$USER/.platformio/packages/framework-mbed/platformio/package_deps/py3/past/types/oldstr.py Line 5 :
* from collections import Iterable > from collections.abc import Iterable
~ /home/$USER/.platformio/packages/framework-mbed/platformio/package_deps/py3/past/builtins/misc.py Line 4:
* from collections import Mapping > from collections.abc import Mapping
After these steps is it necessary any other configuration? I edited the files, however the problem persists
Hey, you can trace your stderr message and find the problem. It was enough to edit that file before but idk now.