[Scons-users] Fwd: Action object does not handle functions with unicode constants
Bill Deegan
bill at baddogconsulting.com
Fri Jun 22 23:24:52 EDT 2018
I don't think it's a known issue.
I have a patch if you'd like to try it.
You can use my branch
https://github.com/bdbaddog/scons/tree/fix_action_functions_with_unicode_constants_py2
Or patch your tree with src/engine/SCons/Util.py from that branch.
It should resolve your issue.
Let me know if it doesn't.
-Bill
On Fri, Jun 22, 2018 at 2:17 AM, Eugene Leskinen <karbazol at gmail.com> wrote:
> Does it look like a known issue?
>
> чт, 21 июн. 2018 г. в 15:45, Bill Deegan <bill at baddogconsulting.com>:
>
>> Never mind.. I pulled up the wrong file.
>>
>> On Thu, Jun 21, 2018 at 8:44 AM, Bill Deegan <bill at baddogconsulting.com>
>> wrote:
>>
>>> you're example has:
>>> from lowesbuilder import *
>>>
>>> Will it work without that?
>>> Can you trim it down a bit?
>>>
>>> -Bill
>>>
>>> On Thu, Jun 21, 2018 at 7:45 AM, Eugene Leskinen <karbazol at gmail.com>
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I wanted to create an Action object from Python function and got the
>>>> following error:
>>>>
>>>> scons: Reading SConscript files ...
>>>> TypeError: can only join an iterable of bytes (item 3 has type
>>>> 'unicode'):
>>>> File "D:\personal\scons_bugs\action_unicode\SConstruct", line 23:
>>>> build_it
>>>> File "c:\python2764\lib\site-packages\scons-3.0.1\SCons\Action.py",
>>>> line 515:
>>>> return _do_create_action(act, kw)
>>>> File "c:\python2764\lib\site-packages\scons-3.0.1\SCons\Action.py",
>>>> line 485:
>>>> return action_type(act, kw)
>>>> File "c:\python2764\lib\site-packages\scons-3.0.1\SCons\Action.py",
>>>> line 1127:
>>>> self.funccontents = _callable_contents(execfunction)
>>>> File "c:\python2764\lib\site-packages\scons-3.0.1\SCons\Action.py",
>>>> line 169:
>>>> return _function_contents(obj)
>>>> File "c:\python2764\lib\site-packages\scons-3.0.1\SCons\Action.py",
>>>> line 301:
>>>> contents = [_code_contents(func.__code__, func.__doc__)]
>>>> File "c:\python2764\lib\site-packages\scons-3.0.1\SCons\Action.py",
>>>> line 264:
>>>> contents.extend(bytearray(',', 'utf-8').join(z))
>>>>
>>>> I have faced the issue with scons of version 3.0.0 and 3.0.1.
>>>> Scons of version 2.5.1 correctly handles such functions.
>>>> To re-produce the issue I have created a Sconstruct file (attached).
>>>> Use command 'scons hello.txt' to re-produce the issue.
>>>> Use command 'scons hello.txt WORK=1' to work around the issue.
>>>>
>>>> Is it already known issue?
>>>> Should I submit it to github?
>>>>
>>>> --
>>>> Regards,
>>>> Eugene Leskinen
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> Eugene Leskinen
>>>>
>>>> _______________________________________________
>>>> Scons-users mailing list
>>>> Scons-users at scons.org
>>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>>
>>>>
>>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
>
> --
> Regards,
> Eugene Leskinen
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180622/d4ea86dc/attachment.html>
More information about the Scons-users
mailing list