[Scons-users] Fwd: Action object does not handle functions with unicode constants

Bill Deegan bill at baddogconsulting.com
Thu Jun 21 08:44:17 EDT 2018


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180621/ddc83a18/attachment.html>


More information about the Scons-users mailing list