Discussion:
[Scons-users] AttributeError: 'NoneType' object has no attribute 'loader':
Bassem Girgis
2018-08-01 07:07:57 UTC
Permalink
I'm trying to build a project that used to build fine. After doing a
routine update for my linux machine, I started getting this error. My
site_init.py is empty. I'm hoping this issue is related to something new
that went into a recent release of scons.

$ scons
*** Error loading site_init file './site_scons/site_init.py':
AttributeError: 'NoneType' object has no attribute 'loader':
File "/usr/lib/scons-3.0.1/SCons/Script/Main.py", line 1396:
_exec_main(parser, values)
File "/usr/lib/scons-3.0.1/SCons/Script/Main.py", line 1359:
_main(parser)
File "/usr/lib/scons-3.0.1/SCons/Script/Main.py", line 990:
_load_all_site_scons_dirs(d.get_internal_path())
File "/usr/lib/scons-3.0.1/SCons/Script/Main.py", line 843:
_load_site_scons_dir(d)
File "/usr/lib/scons-3.0.1/SCons/Script/Main.py", line 781:
mod = importlib.util.module_from_spec(spec)
File "<frozen importlib._bootstrap>", line 568:
Mats Wichmann
2018-08-01 14:06:42 UTC
Permalink
Post by Bassem Girgis
I'm trying to build a project that used to build fine. After doing a
routine update for my linux machine, I started getting this error. My
site_init.py is empty. I'm hoping this issue is related to something new
that went into a recent release of scons.
$ scons
_exec_main(parser, values)
_main(parser)
_load_all_site_scons_dirs(d.get_internal_path())
_load_site_scons_dir(d)
mod = importlib.util.module_from_spec(spec)
What are the details of your setup? as in distribution, scons pkg
version, Python version?

I'll leave more responses to those more expert, but I ask the above
because that traceback doesn't seem to match up with the code in 3.0.1,
at least not the copy I have, and I wonder if someone has patched scons.
If the update was very recent and you now have Python 3.7, that could be
particularly likely because something broke relating to imports, as
noted here:

https://github.com/SCons/scons/pull/3159
Bill Deegan
2018-08-01 17:00:38 UTC
Permalink
Are you using the code in this pull request?
https://github.com/SCons/scons/pull/3159
Post by Mats Wichmann
Post by Bassem Girgis
I'm trying to build a project that used to build fine. After doing a
routine update for my linux machine, I started getting this error. My
site_init.py is empty. I'm hoping this issue is related to something new
that went into a recent release of scons.
$ scons
_exec_main(parser, values)
_main(parser)
_load_all_site_scons_dirs(d.get_internal_path())
_load_site_scons_dir(d)
mod = importlib.util.module_from_spec(spec)
What are the details of your setup? as in distribution, scons pkg
version, Python version?
I'll leave more responses to those more expert, but I ask the above
because that traceback doesn't seem to match up with the code in 3.0.1,
at least not the copy I have, and I wonder if someone has patched scons.
If the update was very recent and you now have Python 3.7, that could be
particularly likely because something broke relating to imports, as
https://github.com/SCons/scons/pull/3159
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
Bassem Girgis
2018-08-01 23:40:21 UTC
Permalink
Here are some details:
$ scons --version
SCons by Steven Knight et al.:
script: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668, 2017/11/14
13:16:53, by bdbaddog on hpmicrodog
engine: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668, 2017/11/14
13:16:53, by bdbaddog on hpmicrodog
engine path: ['/usr/lib/scons-3.0.1/SCons']
Copyright (c) 2001 - 2017 The SCons Foundation
$ python3 --version
Python 3.6.5
$ cat /etc/*-release
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"
NAME="openSUSE Tumbleweed"
# VERSION="20180726"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20180726"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20180726"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
Post by Bill Deegan
Are you using the code in this pull request?
https://github.com/SCons/scons/pull/3159
Post by Mats Wichmann
Post by Bassem Girgis
I'm trying to build a project that used to build fine. After doing a
routine update for my linux machine, I started getting this error. My
site_init.py is empty. I'm hoping this issue is related to something new
that went into a recent release of scons.
$ scons
_exec_main(parser, values)
_main(parser)
_load_all_site_scons_dirs(d.get_internal_path())
_load_site_scons_dir(d)
mod = importlib.util.module_from_spec(spec)
What are the details of your setup? as in distribution, scons pkg
version, Python version?
I'll leave more responses to those more expert, but I ask the above
because that traceback doesn't seem to match up with the code in 3.0.1,
at least not the copy I have, and I wonder if someone has patched scons.
If the update was very recent and you now have Python 3.7, that could be
particularly likely because something broke relating to imports, as
https://github.com/SCons/scons/pull/3159
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
Bassem Girgis
2018-08-02 00:26:39 UTC
Permalink
$pip3 uninstall scons
$pip3 install scons

seems to have solved this issue. Sorry for the false alarm.
Post by Bassem Girgis
$ scons --version
script: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668,
2017/11/14 13:16:53, by bdbaddog on hpmicrodog
engine: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668,
2017/11/14 13:16:53, by bdbaddog on hpmicrodog
engine path: ['/usr/lib/scons-3.0.1/SCons']
Copyright (c) 2001 - 2017 The SCons Foundation
$ python3 --version
Python 3.6.5
$ cat /etc/*-release
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"
NAME="openSUSE Tumbleweed"
# VERSION="20180726"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20180726"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20180726"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
Post by Bill Deegan
Are you using the code in this pull request?
https://github.com/SCons/scons/pull/3159
Post by Mats Wichmann
Post by Bassem Girgis
I'm trying to build a project that used to build fine. After doing a
routine update for my linux machine, I started getting this error. My
site_init.py is empty. I'm hoping this issue is related to something
new
Post by Bassem Girgis
that went into a recent release of scons.
$ scons
_exec_main(parser, values)
_main(parser)
_load_all_site_scons_dirs(d.get_internal_path())
_load_site_scons_dir(d)
mod = importlib.util.module_from_spec(spec)
What are the details of your setup? as in distribution, scons pkg
version, Python version?
I'll leave more responses to those more expert, but I ask the above
because that traceback doesn't seem to match up with the code in 3.0.1,
at least not the copy I have, and I wonder if someone has patched scons.
If the update was very recent and you now have Python 3.7, that could be
particularly likely because something broke relating to imports, as
https://github.com/SCons/scons/pull/3159
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
Bill Deegan
2018-08-02 02:46:07 UTC
Permalink
Bassem,

Indeed.. there's no importlib used in
https://github.com/SCons/scons/blob/3.0.1/src/engine/SCons/Script/Main.py

You must've somehow installed the contents of the unmerged pull request..
(which hasn't been merged because of that issue among others).

-Bill
Post by Bassem Girgis
$pip3 uninstall scons
$pip3 install scons
seems to have solved this issue. Sorry for the false alarm.
Post by Bassem Girgis
$ scons --version
script: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668,
2017/11/14 13:16:53, by bdbaddog on hpmicrodog
engine: v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668,
2017/11/14 13:16:53, by bdbaddog on hpmicrodog
engine path: ['/usr/lib/scons-3.0.1/SCons']
Copyright (c) 2001 - 2017 The SCons Foundation
$ python3 --version
Python 3.6.5
$ cat /etc/*-release
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-
noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"
NAME="openSUSE Tumbleweed"
# VERSION="20180726"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20180726"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20180726"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
Post by Bill Deegan
Are you using the code in this pull request?
https://github.com/SCons/scons/pull/3159
Post by Mats Wichmann
Post by Bassem Girgis
I'm trying to build a project that used to build fine. After doing a
routine update for my linux machine, I started getting this error. My
site_init.py is empty. I'm hoping this issue is related to something
new
Post by Bassem Girgis
that went into a recent release of scons.
$ scons
_exec_main(parser, values)
_main(parser)
_load_all_site_scons_dirs(d.get_internal_path())
_load_site_scons_dir(d)
mod = importlib.util.module_from_spec(spec)
What are the details of your setup? as in distribution, scons pkg
version, Python version?
I'll leave more responses to those more expert, but I ask the above
because that traceback doesn't seem to match up with the code in 3.0.1,
at least not the copy I have, and I wonder if someone has patched scons.
If the update was very recent and you now have Python 3.7, that could be
particularly likely because something broke relating to imports, as
https://github.com/SCons/scons/pull/3159
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
_______________________________________________
Scons-users mailing list
https://pairlist4.pair.net/mailman/listinfo/scons-users
Loading...