Trying to set a target before building Fuchsia, but getting the following error.
I tried converting the sep
to byte by using b.startswith(b'sep')
then it gives the error.
So I am just stuck on how to deal with this. I have zero knowledge of python.
prashant@prashant-Lenovo:~/fuchsia$ scripts/fx set x64
and the output is :
ERROR at //build/gn/BUILD.gn:67:5: Script returned non-zero exit code.
exec_script("//build/zircon/list_source_files.py", [], "list lines")
^---------- Current dir: /home/prashant/fuchsia/out/x64/ Command: /usr/bin/env -- /home/prashant/fuchsia/build/zircon/list_source_files.py Returned 1. stderr:
Traceback (most recent call last): File "/home/prashant/fuchsia/build/zircon/list_source_files.py", line 36, in <module>
sys.exit(main()) File "/home/prashant/fuchsia/build/zircon/list_source_files.py", line 31, in main
for file in get_files(): File "/home/prashant/fuchsia/build/zircon/list_source_files.py", line 27, in get_files
return [os.path.join(ZIRCON_ROOT, file) for file in files] File "/home/prashant/fuchsia/build/zircon/list_source_files.py", line 27, in <listcomp>
return [os.path.join(ZIRCON_ROOT, file) for file in files] File "/usr/lib/python3.6/posixpath.py", line 87, in join
if b.startswith(sep): TypeError: startswith first arg must be bytes or a tuple of bytes, not str
I just ran into this particular problem too. The problem probably comes from the fact that your system's
python
is aliased topython3
instead ofpython2
.This is a bug in the fuchsia build scripts. It can be resolved by either:
#!/usr/bin/env python
to#!/usr/bin/env python2
python
to point topython2
. This may break other things on your system.