guake icon indicating copy to clipboard operation
guake copied to clipboard

TypeError: 'NoneType' object is not callable while building from source

Open pabloab opened this issue 2 years ago • 16 comments

Following instructions to install from source on an Ubuntu 20.04 (used ./scripts/bootstrap-dev-debian.sh).

$ sudo make install
install -dm755                                       "//usr/local/share/applications"
install -Dm644 "/home/user/foo/guake/guake/data/guake.desktop"       "//usr/local/share/applications/"
install -Dm644 "/home/user/foo/guake/guake/data/guake-prefs.desktop" "//usr/local/share/applications/"
install -dm755                                       "//usr/local/share/metainfo/"
install -Dm644 "/home/user/foo/guake/guake/data/guake.desktop.metainfo.xml"  "//usr/local/share/metainfo/"
install -dm755                                 "//usr/local/share/guake/pixmaps"
install -Dm644 "/home/user/foo/guake/guake/data"/pixmaps/*.png "//usr/local/share/guake/pixmaps/"
install -Dm644 "/home/user/foo/guake/guake/data"/pixmaps/*.svg "//usr/local/share/guake/pixmaps/"
install -dm755                                     "//usr/local/share/pixmaps"
install -Dm644 "/home/user/foo/guake/guake/data/pixmaps/guake.png" "//usr/local/share/pixmaps/"
install -dm755                                           "//usr/local/share/guake"
install -Dm644 "/home/user/foo/guake/guake/data/autostart-guake.desktop" "//usr/local/share/guake/"
install -dm755                           "//usr/local/share/guake"
install -Dm644 "/home/user/foo/guake/guake/data"/*.glade "//usr/local/share/guake/"
install -dm755                                         "//usr/local/share/glib-2.0/schemas"
install -Dm644 "/home/user/foo/guake/guake/data/org.guake.gschema.xml" "//usr/local/share/glib-2.0/schemas/"
if [ 1 = 1 ]; then glib-compile-schemas //usr/local/share/glib-2.0/schemas; fi
for f in $(find po -iname "*.mo"); do \
	l="${f%%.*}"; \
	lb=$(basename $l); \
	install -Dm644 "$f" "//usr/local/share/locale/$lb/LC_MESSAGES/guake.mo"; \
done;
# you probably want to execute this target with sudo:
# sudo make install
#############################################################

Installing from source on your system is not recommended.
Please prefer you application package manager (apt, yum, ...)

#############################################################
Traceback (most recent call last):
  File "setup.py", line 5, in <module>
    setuptools.setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 447, in __init__
    _Distribution.__init__(self, {
  File "/usr/lib/python3.8/distutils/dist.py", line 292, in __init__
    self.finalize_options()
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 740, in finalize_options
    ep.load()(self)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords
    ep.load()(self, ep.name, value)
  File "/usr/lib/python3/dist-packages/setuptools_scm/integration.py", line 17, in version_keyword
    dist.metadata.version = _get_version(config)
  File "/usr/lib/python3/dist-packages/setuptools_scm/__init__.py", line 150, in _get_version
    version_string = format_version(
  File "/usr/lib/python3/dist-packages/setuptools_scm/version.py", line 307, in format_version
    local_version = local_scheme(version)
TypeError: 'NoneType' object is not callable
make: *** [Makefile:93: install-guake] Error 1

pabloab avatar Jan 29 '22 07:01 pabloab

Hum, local_scheme should be getting set up from setup.py. Did you run make first?

Davidy22 avatar Jan 29 '22 13:01 Davidy22

Yes I did. Didn't get any error there. I could add its output, ITH.

pabloab avatar Jan 30 '22 01:01 pabloab

get the same error... :(

w6m6 avatar Feb 06 '22 09:02 w6m6

@Davidy22 there is any set of tests we could run to help solve this issue? This probably deserve a critical or blocking label. I'm having some other issues I wish to file but first I need to test again last Guake release.

pabloab avatar Feb 06 '22 21:02 pabloab

This doesn't prevent build in CI or for dev team so it's not quite blocking. Did some more searching around, the only leads I'm finding suggest this happens with old versions of setuptools_scm, what's the version you have installed?

Davidy22 avatar Feb 07 '22 12:02 Davidy22

$ pip show setuptools_scm | grep Version
Version: 3.4.3

pabloab avatar Feb 07 '22 17:02 pabloab

This doesn't prevent build in CI or for dev team so it's not quite blocking. Did some more searching around, the only leads I'm finding suggest this happens with old versions of setuptools_scm, what's the version you have installed?

After this post i run pip install --upgrade setuptools_scm and now version is 6.4.2, but error is still persist.

snake1glide avatar Feb 08 '22 04:02 snake1glide

By bisecting I was able to get following "bad" commits:

c043278a41e4a5673001197582a240740aa053e5 // ?
1f1926c995a553a0e66ebb032abc3ef6c1b33549 // dependabot
c828377fee3800ae242d6f2f2a9136a566f8d26c // Causes some other commits to fail to build [1]
b2f7570cb4f0836cac9769426891581ffb8c6ad0 // ?
cfdd721c3c40a66b8e6c793e130d7f5e13aac38a // Unlikely to cause error

[1] error: can't copy 'po/*.mo': doesn't exist or not a regular file - these commits were skipped, but it's possible that some skipped commit introduced a bug.

@eli-schwartz Can you have a look at this?

Ginden avatar Feb 25 '22 15:02 Ginden

You get that error if you manage to use a setuptools version older than the minimum version pin from the requirements. That is the version needed for the glob to be treated as a glob instead of a literal string filename.

Try updating setuptools in addition to setuptools_scm.

eli-schwartz avatar Feb 25 '22 15:02 eli-schwartz

You get that error if you manage to use a setuptools version older than the minimum version pin from the requirements. That is the version needed for the glob to be treated as a glob instead of a literal string filename.

Try updating setuptools in addition to setuptools_scm.

Hello,

I'v upgrade the setuptools and setuptools_scm to lastest version. by stilll get the same error.

`✗ pip show setuptools_scm | grep Version Version: 6.4.2

MS in guake on  master [!] via 🐍 v3.8.12 ❯ pip show setuptools | grep Version Version: 60.9.3 `

w6m6 avatar Feb 27 '22 07:02 w6m6

You get the same

error: can't copy 'po/*.mo': doesn't exist or not a regular file

error that @Ginden got?

eli-schwartz avatar Feb 27 '22 12:02 eli-schwartz

Been going through deprecation warnings, changed some things, would like to hear if any of the things I've done were able to maybe coincidentally resolve this issue

Davidy22 avatar Jun 17 '22 08:06 Davidy22

Hello, folks! I am facing the same issue, any updates on how to resolve it?

laukik-hase avatar Sep 13 '22 04:09 laukik-hase

Don't use git pull origin master from the repo which once built. The command git clean also doesn't work well. Clone the repo cleanly and build it from there. The problem was solved for me in this way.

fx-kirin avatar Sep 13 '22 13:09 fx-kirin

Still facing this issue and a clean git clone didn't help. Any news on this?

$ pip show setuptools_scm | grep Version
Version: 7.1.0
$ python3 --version
Python 3.8.10

I had to use guake version 3.8.0

atomass avatar Mar 22 '23 09:03 atomass

I resolved it by changing pipenv version in scripts/bootstrap-dev-pip.sh from 2018.11.26 to 2022.4.8 (found the new version in Pipfile.lock)

mohamed-essam avatar Jul 02 '23 19:07 mohamed-essam