Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scons error while compiling cpp bindings #12

Closed
pwab opened this issue May 4, 2020 · 2 comments
Closed

Scons error while compiling cpp bindings #12

pwab opened this issue May 4, 2020 · 2 comments

Comments

@pwab
Copy link

pwab commented May 4, 2020

I updated my Visual Studio 2019 instance, installed scons with pip and cloned the master. I got to the point where I should compile the cpp bindings. I encountered the following error:

C:\Daten\Workspace\GitHub\gdleapmotion\godot-cpp>scons platform=windows bits=64 generate_bindings=yes
scons: Reading SConscript files ...
TypeError: write() argument must be str, not bytes:
  File "C:\Daten\Workspace\GitHub\gdleapmotion\godot-cpp\SConstruct", line 148:
    env = Environment(ENV = os.environ)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Environment.py", line 990:
    apply_tools(self, tools, toolpath)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Environment.py", line 102:
    env.Tool(tool)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Environment.py", line 1810:
    tool(self)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Tool\__init__.py", line 303:
    self.generate(env, *args, **kw)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Tool\default.py", line 41:
    SCons.Tool.Tool(t)(env)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Tool\__init__.py", line 303:
    self.generate(env, *args, **kw)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Tool\mslink.py", line 314:
    msvc_setup_env_once(env)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Tool\MSCommon\vc.py", line 695:
    msvc_setup_env(env)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Tool\MSCommon\vc.py", line 814:
    d = msvc_find_valid_batch_script(env,version)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Tool\MSCommon\vc.py", line 762:
    d = script_env(vc_script, args=arg)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Tool\MSCommon\vc.py", line 621:
    stdout = common.get_output(script, args)
  File "c:\users\pwab\appdata\local\programs\python\python38-32\lib\site-packages\scons\SCons\Tool\MSCommon\common.py", line 238:
    sys.stderr.write(stderr)
@pwab
Copy link
Author

pwab commented May 4, 2020

This can be easily solved by using Python 64-bit instead of 32-bit. :bowtie:

@BastiaanOlij
Copy link
Member

That makes a lot of sense because you're in the 64bit environment with the compiler as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants