Anyway, the problem is likely in CopySubAction in site_scons/site_init.py.
On line 111, the file 'sourcefile' is opened as binary. Then, when then
next line, 'contents = r.read()' is executed, contents ends up as a bytes
object. Thus on line 123, when 'contents = contents.replace(k, v)' is
executed, contents is a bytes object, whereas k and v are strings. You
can't mix strings and bytes objects like that in Python 3.
You could perhaps try opening the file as a text file instead (remove the
'b') from the open function call.