[Scons-users] A bug in an error message?
Matthew Marinets
Matthew.Marinets at Kardium.com
Wed Jun 20 14:58:14 EDT 2018
So in my build we have many many custom builders associated with code generation. Normally when things go wrong the error messages are difficult to understand, but this one stumped me for quite a while until I noticed something:
Error message:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 62: invalid start byte:
File "C:\proj\Branches\Sandbox\multiStim\Canopus\SConstruct", line 332:
standardBuild('FirmwareCommon', firmwareRoot + '/Common', env.subst('$versionNumber_Firmware'))
File "C:\proj\Branches\Sandbox\multiStim\Canopus\SConstruct", line 314:
SConscript(componentRoot + '/' + scriptName, exports = ['env', 'mbenv', 'versionNumber'])
File "C:\Program Files\Python36\scons-3.0.0\SCons\Script\SConscript.py", line 607:
return method(*args, **kw)
File "C:\Program Files\Python36\scons-3.0.0\SCons\Script\SConscript.py", line 544:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\Program Files\Python36\scons-3.0.0\SCons\Script\SConscript.py", line 253:
call_stack[-1].globals)
File "C:\proj\Branches\Sandbox\multiStim\Canopus\Electrical\FPGA\Firmware\Common\SConscript", line 236:
CMDFLAGS = '/min'))
File "C:\Program Files\Python36\scons-3.0.0\SCons\Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "C:\proj\Branches\Sandbox\multiStim\Tools\Python\KSCons\GenerationTools\PacketGen.py", line 131:
action = packetGenAction,)
File "C:\Program Files\Python36\scons-3.0.0\SCons\Environment.py", line 1965:
return bld(self, target, source, **kw)
File "C:\Program Files\Python36\scons-3.0.0\SCons\Builder.py", line 635:
return self._execute(env, target, source, OverrideWarner(kw), ekw)
File "C:\Program Files\Python36\scons-3.0.0\SCons\Builder.py", line 557:
_node_errors(self, env, tlist, slist)
File "C:\Program Files\Python36\scons-3.0.0\SCons\Builder.py", line 303:
msg = "Two environments with different actions were specified for the same target: %s\n(action 1: %s)\n(action 2: %s)" % (t,t_contents.decode('utf-8'),contents.decode('utf-8'))
What this error message is trying to say is that there are two commands to generate the same target. However, the error message displayed at the top is "UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 62: invalid start byte:" This is because the intended error message isn't formatted properly, and just ends up throwing its own error to mask the original.
Has anyone else run into this problem? Am I doing something wrong or is this a bug?
Thanks,
-Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180620/cc28d1e5/attachment.html>
More information about the Scons-users
mailing list