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

Eugene Leskinen karbazol at gmail.com
Thu Jun 21 07:45:17 EDT 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180621/307d9b9d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SConstruct
Type: application/octet-stream
Size: 721 bytes
Desc: not available
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180621/307d9b9d/attachment.obj>


More information about the Scons-users mailing list