0 votes

Hello, I am trying build Godot engine from source by this manual: http://docs.godotengine.org/en/stable/development/compiling/compiling_for_x11.html
but I when I run command: scons platform=x11

I get this error result:

scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
AttributeError: 'module' object has no attribute 'can_build':
  File "/home/martin/Projects/godot/SConstruct", line 398:
      if (config.can_build(selected_platform)):

I am using: Ubuntu 16.04.3 LTS

in Engine by (21 points)

2 Answers

0 votes
Best answer

Ok I localized python script config.py in /usr/lib/python2.7/config.pyby command:
python -c "import config; print(config.__file__)"

I removed it and now it works.

by (21 points)
0 votes


After some research I realized that this problem comes from a module that I had added in the modules directory of godot. In my case speech to text because I was looking to install this module here: https://samuraisigma.github.io/godot-docs/doc/community/tutorials/misc/speech_to_text.html.

To solve the problem I went to the directory of the module in question (speech to text) and I opened config.py in this source I modified the signature of the can_buil function so that it has 2 arguments. From what I understand it is a compatibility issue between GODOT 3.0 and 3.1.

The full solution is described here: http://128mots.com/index.php/en/2021/02/17/typeerror-can_build-takes-1-positional-argument-but-2-were-given/

by (50 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.