-
Notifications
You must be signed in to change notification settings - Fork 63
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
Could not initialize mbed project #4360
Comments
A little bit cleaned up:
Could be python version? |
Opening the project that I initialized and then attempting to build returns a clean version of the error messages above.
|
changing compat.py in intelhex to
was not a success. |
adding a Reverting. |
Checking python documentation for the array package tells me there is no |
Found a fix for |
Note: wrapping |
Final |
Intel hex is outdated on framework-mbed. Opening pull request and issue there. |
I am unable to initialize project for the y5 nrf51822 mbug.
I am using a AMD Ryzen 5500U, with Windows and VSCode, Platform Mbed.
The error message I get:
PIO Core Call Error: "Resolving nrf51_mkit environment packages...\r\nAlready up-to-date.\r\nResolving nrf51822_y5_mbug environment packages...\r\nAlready up-to-date.\r\nUpdating metadata for the vscode IDE...\r\n\n\nError: Processing nrf51822_y5_mbug (platform: nordicnrf51; board: nrf51822_y5_mbug; framework: mbed)\r\n--------------------------------------------------------------------------------\r\nVerbose mode can be enabled via
-v, --verbose
option\r\nCONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf51/nrf51822_y5_mbug.html\r\nPLATFORM: Nordic nRF51 (8.1.0) > y5 nRF51822 mbug\r\nHARDWARE: NRF51822 16MHz, 16KB RAM, 256KB Flash\r\nDEBUG: Current (cmsis-dap) On-board (cmsis-dap) External (blackmagic, jlink, stlink)\r\nPACKAGES: \r\n - framework-mbed @ 5.51105.190312 (5.11.5) \r\n - tool-sreccat @ 1.164.0 (1.64) \r\n - toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1)\r\nAttributeError: type object 'array.array' has no attribute 'tostring':\r\n File "C:\Users\henri\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 184:\r\n env.SConscript("$BUILD_SCRIPT")\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 597:\r\n return _SConscript(self.fs, *files, **subst_kw)\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 285:\r\n exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)\r\n File "C:\Users\henri\.platformio\platforms\nordicnrf51\builder\main.py", line 116:\r\n target_elf = env.BuildProgram()\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:\r\n return self.method(*nargs, **kwargs)\r\n File "C:\Users\henri\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 63:\r\n env.ProcessProgramDeps()\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:\r\n return self.method(*nargs, **kwargs)\r\n File "C:\Users\henri\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 126:\r\n env.BuildFrameworks(env.get("PIOFRAMEWORK"))\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Util.py", line 742:\r\n return self.method(*nargs, **kwargs)\r\n File "C:\Users\henri\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 346:\r\n SConscript(env.GetFrameworkScript(f), exports="env")\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 660:\r\n return method(*args, **kw)\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 597:\r\n return _SConscript(self.fs, *files, **subst_kw)\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 285:\r\n exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)\r\n File "C:\Users\henri\.platformio\platforms\nordicnrf51\builder\frameworks\mbed.py", line 35:\r\n SConscript(\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 660:\r\n return method(*args, **kw)\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 597:\r\n return _SConscript(self.fs, *files, **subst_kw)\r\n File "C:\Users\henri\.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Script\SConscript.py", line 285:\r\n exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)\r\n File "C:\Users\henri\.platformio\packages\framework-mbed\platformio\platformio-build.py", line 40:\r\n from pio_mbed_adapter import PlatformioMbedAdapter\r\n File "C:\Users\henri\.platformio\packages\framework-mbed\platformio\pio_mbed_adapter.py", line 23:\r\n from tools.build_api import (prepare_toolchain, merge_region_list,\r\n File "C:\Users\henri\.platformio\packages\framework-mbed\tools\build_api.py", line 30:\r\n from intelhex import IntelHex\r\n File "C:\Users\henri\.platformio\packages\framework-mbed\platformio\package_deps\py3\intelhex\init.py", line 44:\r\n from intelhex.compat import (\r\n File "C:\Users\henri\.platformio\packages\framework-mbed\platformio\package_deps\py3\intelhex\compat.py", line 60:\r\n array_tobytes = getattr(array.array, "tobytes", array.array.tostring)\r\n========================== [FAILED] Took 0.60 seconds ==========================\r\n\r\nEnvironment Status Duration\r\n---------------- -------- ------------\r\nnrf51822_y5_mbug FAILED 00:00:00.600\r\n==================== 1 failed, 0 succeeded in 00:00:00.600 ===================="The error itself:
AttributeError: type object 'array.array' has no attribute 'tostring'
Other notes:
I am using the latest Platform IO version.
What should I try to do to fix this?
(This issue has appeared 4 times already, but no one else included extra information about their system and configuration.)
EDIT was just looking through the issues page, it appears more than 4 times...
The text was updated successfully, but these errors were encountered: