Error during compile Godot engine from source code

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Drakeman
:warning: Old Version Published before Godot 3 was released.

Hello, I am trying build Godot engine from source by this manual: Compiling for Linux, *BSD — Godot Engine (stable) documentation in English
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

:bust_in_silhouette: Reply From: Drakeman

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.

:bust_in_silhouette: Reply From: sebsays

Hello,

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/