Discussion:
[Scons-users] A bug in an error message?
Matthew Marinets
2018-06-20 18:58:14 UTC
Permalink
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
Bill Deegan
2018-06-20 19:18:59 UTC
Permalink
Which version of Python?
Have you tried SCons 3.0.1?

On Wed, Jun 20, 2018 at 2:58 PM, Matthew Marinets <
Post by Matthew Marinets
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
standardBuild('FirmwareCommon', firmwareRoot +
'/Common', env.subst('$versionNumber_Firmware'))
SConscript(componentRoot + '/' + scriptName, exports =
['env', 'mbenv', 'versionNumber'])
return method(*args, **kw)
return _SConscript(self.fs, *files, **subst_kw)
call_stack[-1].globals)
File "C:\proj\Branches\Sandbox\multiStim\Canopus\Electrical\
CMDFLAGS = '/min'))
return self.method(*nargs, **kwargs)
File "C:\proj\Branches\Sandbox\multiStim\Tools\Python\KSCons\GenerationTools\PacketGen.py",
action = packetGenAction,)
return bld(self, target, source, **kw)
return self._execute(env, target, source,
OverrideWarner(kw), ekw)
_node_errors(self, env, tlist, slist)
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
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
Matthew Marinets
2018-06-20 20:13:33 UTC
Permalink
I’m running SCons 3.0.0 with Python 2.6.5, on Windows 10.

I haven’t looked into SCons 3.0.1 yet, though I suppose the upgrade shouldn’t be too difficult.

-Matthew

From: Scons-users <scons-users-***@scons.org> On Behalf Of Bill Deegan
Sent: June 20, 2018 12:19
To: SCons users mailing list <scons-***@scons.org>
Subject: Re: [Scons-users] A bug in an error message?

Which version of Python?
Have you tried SCons 3.0.1?

On Wed, Jun 20, 2018 at 2:58 PM, Matthew Marinets <***@kardium.com<mailto:***@kardium.com>> wrote:
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

_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users
Bill Deegan
2018-06-20 21:39:33 UTC
Permalink
Are your actions python function actions?

On Wed, Jun 20, 2018 at 4:13 PM, Matthew Marinets <
Post by Matthew Marinets
I’m running SCons 3.0.0 with Python 2.6.5, on Windows 10.
I haven’t looked into SCons 3.0.1 yet, though I suppose the upgrade
shouldn’t be too difficult.
-Matthew
Deegan
*Sent:* June 20, 2018 12:19
*Subject:* Re: [Scons-users] A bug in an error message?
Which version of Python?
Have you tried SCons 3.0.1?
On Wed, Jun 20, 2018 at 2:58 PM, Matthew Marinets <
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
standardBuild('FirmwareCommon', firmwareRoot +
'/Common', env.subst('$versionNumber_Firmware'))
SConscript(componentRoot + '/' + scriptName, exports =
['env', 'mbenv', 'versionNumber'])
return method(*args, **kw)
return _SConscript(self.fs, *files, **subst_kw)
call_stack[-1].globals)
File "C:\proj\Branches\Sandbox\multiStim\Canopus\Electrical\
CMDFLAGS = '/min'))
return self.method(*nargs, **kwargs)
File "C:\proj\Branches\Sandbox\multiStim\Tools\Python\KSCons\GenerationTools\PacketGen.py",
action = packetGenAction,)
return bld(self, target, source, **kw)
return self._execute(env, target, source,
OverrideWarner(kw), ekw)
_node_errors(self, env, tlist, slist)
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
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
Matthew Marinets
2018-06-20 21:45:33 UTC
Permalink
This one is a string.

The substitution looks like an issue with the targets, and now that I really squint at my code I realize that the list of targets I pass in might have nested lists inside of it (i.e. [1, 2, [3, 4], 5]). But I thought flattening the target list was handled by the environment’s builder wrapper?

-Matthew

From: Scons-users <scons-users-***@scons.org> On Behalf Of Bill Deegan
Sent: June 20, 2018 14:40
To: SCons users mailing list <scons-***@scons.org>
Subject: Re: [Scons-users] A bug in an error message?

Are your actions python function actions?

On Wed, Jun 20, 2018 at 4:13 PM, Matthew Marinets <***@kardium.com<mailto:***@kardium.com>> wrote:
I’m running SCons 3.0.0 with Python 2.6.5, on Windows 10.

I haven’t looked into SCons 3.0.1 yet, though I suppose the upgrade shouldn’t be too difficult.

-Matthew

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: June 20, 2018 12:19
To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] A bug in an error message?

Which version of Python?
Have you tried SCons 3.0.1?

On Wed, Jun 20, 2018 at 2:58 PM, Matthew Marinets <***@kardium.com<mailto:***@kardium.com>> wrote:
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

_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users
Bill Deegan
2018-06-20 21:47:44 UTC
Permalink
Can you reproduce with a small testcase?


On Wed, Jun 20, 2018 at 5:45 PM, Matthew Marinets <
Post by Matthew Marinets
This one is a string.
The substitution looks like an issue with the targets, and now that I
really squint at my code I realize that the list of targets I pass in might
have nested lists inside of it (i.e. [1, 2, [3, 4], 5]). But I thought
flattening the target list was handled by the environment’s builder wrapper?
-Matthew
Deegan
*Sent:* June 20, 2018 14:40
*Subject:* Re: [Scons-users] A bug in an error message?
Are your actions python function actions?
On Wed, Jun 20, 2018 at 4:13 PM, Matthew Marinets <
I’m running SCons 3.0.0 with Python 2.6.5, on Windows 10.
I haven’t looked into SCons 3.0.1 yet, though I suppose the upgrade
shouldn’t be too difficult.
-Matthew
Deegan
*Sent:* June 20, 2018 12:19
*Subject:* Re: [Scons-users] A bug in an error message?
Which version of Python?
Have you tried SCons 3.0.1?
On Wed, Jun 20, 2018 at 2:58 PM, Matthew Marinets <
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
standardBuild('FirmwareCommon', firmwareRoot +
'/Common', env.subst('$versionNumber_Firmware'))
SConscript(componentRoot + '/' + scriptName, exports =
['env', 'mbenv', 'versionNumber'])
return method(*args, **kw)
return _SConscript(self.fs, *files, **subst_kw)
call_stack[-1].globals)
File "C:\proj\Branches\Sandbox\multiStim\Canopus\Electrical\
CMDFLAGS = '/min'))
return self.method(*nargs, **kwargs)
File "C:\proj\Branches\Sandbox\multiStim\Tools\Python\KSCons\GenerationTools\PacketGen.py",
action = packetGenAction,)
return bld(self, target, source, **kw)
return self._execute(env, target, source,
OverrideWarner(kw), ekw)
_node_errors(self, env, tlist, slist)
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
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
Matthew Marinets
2018-06-20 22:16:18 UTC
Permalink
That’s the issue with this bug. Because it was caused by a particular branch merge, once the issue has been resolved on a computer I’m not sure how to get the file system back into that state.

After trying for a little while, I don’t think I can get the filesystem into any kind of similar state. If I run into it again, I’ll try for the test state, but I don’t think I’ll be able to do it in any reasonable amount of time right now. There’s still one person at my work who hasn’t gone through with this merge, so perhaps I can commandeer his computer when it’s time?

-Matthew

From: Scons-users <scons-users-***@scons.org> On Behalf Of Bill Deegan
Sent: June 20, 2018 14:48
To: SCons users mailing list <scons-***@scons.org>
Subject: Re: [Scons-users] A bug in an error message?

Can you reproduce with a small testcase?


On Wed, Jun 20, 2018 at 5:45 PM, Matthew Marinets <***@kardium.com<mailto:***@kardium.com>> wrote:
This one is a string.

The substitution looks like an issue with the targets, and now that I really squint at my code I realize that the list of targets I pass in might have nested lists inside of it (i.e. [1, 2, [3, 4], 5]). But I thought flattening the target list was handled by the environment’s builder wrapper?

-Matthew

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: June 20, 2018 14:40

To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] A bug in an error message?

Are your actions python function actions?

On Wed, Jun 20, 2018 at 4:13 PM, Matthew Marinets <***@kardium.com<mailto:***@kardium.com>> wrote:
I’m running SCons 3.0.0 with Python 2.6.5, on Windows 10.

I haven’t looked into SCons 3.0.1 yet, though I suppose the upgrade shouldn’t be too difficult.

-Matthew

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: June 20, 2018 12:19
To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] A bug in an error message?

Which version of Python?
Have you tried SCons 3.0.1?

On Wed, Jun 20, 2018 at 2:58 PM, Matthew Marinets <***@kardium.com<mailto:***@kardium.com>> wrote:
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

_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users

Loading...