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 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


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:

To solve the problem I went to the directory of the module in question (speech to text) and I opened 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: