PlatformIO Community

"Filename too long" when running check

Hi

I’m no python expert, so I’m assuming I’m doing something wrong …so how can I fix this problem?

When i try to run clangtidy check from the Advanced Project task menu, it ends in a FileNotFoundError: [WinError 206] The filename or extension is too long with the stacktrace posted below. Normal build runs without any problems

Checking debug > clangtidy (platform: espressif32@^5.0.0; board: esp32dev; framework: arduino)
------------------------------------------------------------------------------------------------------------Error: Traceback (most recent call last):
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\platformio\__main__.py", line 102, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\platformio\cli.py", line 71, in invoke
    return super().invoke(ctx)
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\platformio\check\cli.py", line 136, in cli
    rc = ct.check(
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\platformio\check\tools\base.py", line 236, in check 
    self.execute_check_cmd(cmd)
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\platformio\check\tools\base.py", line 185, in execute_check_cmd
    result = proc.exec_command(
  File "C:\Users\Bas\.platformio\penv\lib\site-packages\platformio\proc.py", line 114, in exec_command      
    with subprocess.Popen(*args, **kwargs) as p:
  File "C:\Users\Bas\.platformio\python3\lib\subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\Bas\.platformio\python3\lib\subprocess.py", line 1420, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 206] The filename or extension is too long