Problem nwith platformio and mac M1

%23 Description of problem
Leave a comment…

BEFORE SUBMITTING, PLEASE SEARCH FOR DUPLICATES IN

%23 Configuration

VSCode: 1.75.1
PIO IDE: v3.3.3
System: Darwin, 24.0.0, arm64

%23 Exception

Error: TypeError: Traceback (most recent call last):
File "/Users/henrirulquin/.platformio/penv/lib/python3.12/site-packages/platformio/__main__.py", line 103, in main
  cli()  %23 pylint: disable=no-value-for-parameter
  ^^^^^
File "/Users/henrirulquin/.platformio/penv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
  return self.main(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/henrirulquin/.platformio/penv/lib/python3.12/site-packages/click/core.py", line 1078, in main
  rv = self.invoke(ctx)
       ^^^^^^^^^^^^^^^^
File "/Users/henrirulquin/.platformio/penv/lib/python3.12/site-packages/platformio/cli.py", line 85, in invoke
  return super().invoke(ctx)
         ^^^^^^^^^^^^^^^^^^^
File "/Users/henrirulquin/.platformio/penv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/henrirulquin/.platformio/penv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
  return ctx.invoke(self.callback, **ctx.params)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/henrirulquin/.platformio/penv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
  return __callback(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/henrirulquin/.platformio/penv/lib/python3.12/site-packages/platformio/home/cli.py", line 92, in cli
  run_server(
File "/Users/henrirulquin/.platformio/penv/lib/python3.12/site-packages/platformio/home/run.py", line 66, in run_server
  if not os.path.isdir(contrib_dir):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen genericpath>", line 42, in isdir
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

============================================================

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
`python -m pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
https://docs.platformio.org/page/faq/index.html

* Report this problem to the developers
https://github.com/platformio/platformio-core/issues

============================================================


  at /Users/henrirulquin/.vscode/extensions/platformio.platformio-ide-3.3.3-darwin-arm64/node_modules/platformio-node-helpers/dist/index.js:1:11001
  at ChildProcess.i (/Users/henrirulquin/.vscode/extensions/platformio.platformio-ide-3.3.3-darwin-arm64/node_modules/platformio-node-helpers/dist/index.js:1:4621)
  at ChildProcess.emit (node:events:526:28)
  at ChildProcess.emit (node:domain:475:12)
  at maybeClose (node:internal/child_process:1092:16)
  at Socket.<anonymous> (node:internal/child_process:451:11)
  at Socket.emit (node:events:526:28)
  at Socket.emit (node:domain:475:12)
  at Pipe.<anonymous> (node:net:687:12)

Mhm, not sure why the contrib_dir would be null. Better cleanly reinstall it.

rm -rf /Users/henrirulquin/.platformio

then use the installer script to reinstall the core. Then restart VSCode.

thanks, it’s work now