Open Q07707 opened 1 year ago
I have same issue and this version does not create firmware file.
Building in release mode RuntimeError: deque mutated during iteration: File "/home/codespace/.platformio/penv/lib/python3.10/site-packages/platformio/builder/main.py", line 182: env.SConscript(env.GetExtraScripts("post"), exports="env") File "/home/codespace/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598: return _SConscript(self.fs, *files, **subst_kw) File "/home/codespace/.platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285: exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) File "/workspaces/Gemini/buildroot/share/PlatformIO/scripts/tronxy_scrypt.py", line 8: marlin.relocate_vtab(board.get('build.offset')) File "/workspaces/Gemini/buildroot/share/PlatformIO/scripts/marlin.py", line 30: replace_define("VECT_TAB_OFFSET", address) File "/workspaces/Gemini/buildroot/share/PlatformIO/scripts/marlin.py", line 19: for define in env['CPPDEFINES']:
I'm having the same issue. Is there any fix for this?
Fix for this is the following, open the last file where env['CPPDEFINES']
is (last file on the error) and add .copy()
right after.
Before:
def replace_define(field, value):
for define in env['CPPDEFINES']:
if define[0] == field:
env['CPPDEFINES'].remove(define)
env['CPPDEFINES'].append((field, value))
After:
def replace_define(field, value):
for define in env['CPPDEFINES'].copy():
if define[0] == field:
env['CPPDEFINES'].remove(define)
env['CPPDEFINES'].append((field, value))
Why does it appear during compilation