Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 842585 - dev-python/pastedeploy-2.1.1-r3: TypeError: expected string or bytes-like object
Summary: dev-python/pastedeploy-2.1.1-r3: TypeError: expected string or bytes-like object
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-04 15:20 UTC by Mario Fetka (geos_one)
Modified: 2022-05-09 17:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build.log (build.log,8.57 KB, text/plain)
2022-05-04 15:22 UTC, Mario Fetka (geos_one)
Details
the eix output (eix.txt,16.72 KB, text/plain)
2022-05-09 07:24 UTC, Mario Fetka (geos_one)
Details
build-python3_9.log (build-python3_9.log,7.62 KB, text/x-log)
2022-05-09 09:07 UTC, Mario Fetka (geos_one)
Details
build.log (build.log,8.61 KB, text/x-log)
2022-05-09 09:07 UTC, Mario Fetka (geos_one)
Details
build.log (build.log,8.62 KB, text/x-log)
2022-05-09 12:06 UTC, Mario Fetka (geos_one)
Details
PastDeploy (PasteDeploy-2.1.1-py3.9.egg-info.tar.gz,1.62 KB, application/gzip)
2022-05-09 12:18 UTC, Mario Fetka (geos_one)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Fetka (geos_one) 2022-05-04 15:20:39 UTC Comment hidden (obsolete)
Comment 1 Mario Fetka (geos_one) 2022-05-04 15:22:29 UTC
Created attachment 776627 [details]
Build.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-08 00:58:13 UTC Comment hidden (obsolete)
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-08 07:04:01 UTC
Well, I'm afraid I can't reproduce.  Could you share the package versions you have installed?  Something alike:

$ EIX_LIMIT_COMPACT=0 eix --compact  -I dev-python/
Comment 4 Mario Fetka (geos_one) 2022-05-09 07:24:56 UTC
Created attachment 777671 [details]
the eix output
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-09 08:18:27 UTC
Hmm, I suspect that one of the packages installed on your system has broken metadata.

Please edit:

  /usr/lib/python3.9/site-packages/nspektr/__init__.py

and below line 25, that is:

  dist = metadata.distribution(req.name)

add:

  print((dist.name, dist.version))

Then try to emerge it again, and paste the new build log.  It should print some package names now.
Comment 6 Mario Fetka (geos_one) 2022-05-09 09:07:15 UTC
Created attachment 777716 [details]
build-python3_9.log
Comment 7 Mario Fetka (geos_one) 2022-05-09 09:07:30 UTC
Created attachment 777719 [details]
build.log
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-09 11:39:30 UTC
(In reply to Mario Fetka (geos_one) from comment #6)
> Created attachment 777716 [details]
> build-python3_9.log

Heh:

(None, None)

That was... unexpected.

Could you also:

  print(req.name)

?

Once we know which package this is, I'll need the .egg-info or .dist-info for it from site-packages.

Did you install any packages using pip or alike?
Comment 9 Mario Fetka (geos_one) 2022-05-09 12:06:13 UTC
Created attachment 777758 [details]
build.log
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-09 12:15:56 UTC
Do you have an earlier version of pastedeploy installed?

Do you have /usr/lib/python3.9/site-packages/PasteDeploy-*?  If yes, then please put them in a tarball and attach here.
Comment 11 Mario Fetka (geos_one) 2022-05-09 12:18:37 UTC
Created attachment 777761 [details]
PastDeploy
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-09 14:03:20 UTC
Still nothing uncommon.

Could you try using the following print instead:

  print(dist.locate_file(""))

?
Comment 13 Mario Fetka (geos_one) 2022-05-09 14:47:10 UTC
The [wheel] section is deprecated. Use [bdist_wheel] instead.
running build
running build_py
creating build
creating build/lib
creating build/lib/paste
copying paste/__init__.py -> build/lib/paste
creating build/lib/paste/deploy
copying paste/deploy/__init__.py -> build/lib/paste/deploy
copying paste/deploy/compat.py -> build/lib/paste/deploy
copying paste/deploy/config.py -> build/lib/paste/deploy
copying paste/deploy/converters.py -> build/lib/paste/deploy
copying paste/deploy/loadwsgi.py -> build/lib/paste/deploy
copying paste/deploy/paster_templates.py -> build/lib/paste/deploy
copying paste/deploy/util.py -> build/lib/paste/deploy
running egg_info
creating PasteDeploy.egg-info
('Paste', '3.5.0')
Paste
/usr/lib/python3.9/site-packages
(None, None)
PasteDeploy
/var/tmp/portage/dev-python/pastedeploy-2.1.1-r3/work/pastedeploy-2.1.1
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/gpep517", line 4, in <module>
    sys.exit(main())
  File "/usr/lib/python3.9/site-packages/gpep517/__main__.py", line 136, in main
    return func(args)
  File "/usr/lib/python3.9/site-packages/gpep517/__main__.py", line 44, in build_wheel
    wheel_name = backend.build_wheel(args.wheel_dir, args.config_json)
  File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 244, in build_wheel
    return self._build_with_temp_dir(['bdist_wheel'], '.whl',
  File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
    self.run_setup()
  File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 281, in run_setup
    super(_BuildMetaLegacyBackend,
  File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 13, in <module>
    setup(
  File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
Comment 14 Mario Fetka (geos_one) 2022-05-09 14:47:52 UTC
i undeploed the pastedeploy
Comment 15 Mario Fetka (geos_one) 2022-05-09 14:56:14 UTC
i removed the old verison but un build it will not work.
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-05-09 16:34:08 UTC
This is really weird.  It seems as if importlib.metadata considered local "pastedeploy" directory as a valid candidate for you but not for me.  I'm afraid I don't have any further ideas.
Comment 17 Mario Fetka (geos_one) 2022-05-09 17:30:12 UTC
i think i found the reason
got rid of  nspkg.pth packages that have this files 
then copied the content of the buil dir to the paste dir in 
/usr/lib/python3.9/site-packages/paste/deploy

then rebuild setuptools
tehn rebuild pastedploy
now the emerge works.