Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #14518
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Felix Yan <felixonmars@archlinux.org> |
| Newsgroups | linux.debian.maint.python |
| Subject | Re: how to fix TypeError: expected string or bytes-like object ? |
| Date | Wed, 05 Oct 2022 13:30:02 +0200 |
| Message-ID | <FdaL8-ccsd-5@gated-at.bofh.it> (permalink) |
| References | <Fd9cl-cbqD-1@gated-at.bofh.it> <Fda8p-cbZB-3@gated-at.bofh.it> <FdarL-cclL-5@gated-at.bofh.it> |
| X-Mailbox-Line | From debian-python-request@lists.debian.org Wed Oct 5 11:29:21 2022 |
| Old-Return-Path | <felixonmars@archlinux.org> |
| X-Amavis-Spam-Status | No, score=-11.483 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, BODY_8BITS=1.5, DIGITS_LETTERS=1, DKIMWL_WL_HIGH=-0.083, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, LDO_WHITELIST=-5, MD5_SHA1_SUM=-1, PGPSIGNATURE=-5, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no |
| X-Policyd-Weight | using cached result; rate: -4.6 |
| MIME-Version | 1.0 |
| Content-Language | en-US-large |
| Content-Type | multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------sXmHjqMcLEmizZeWetZgLvsm" |
| Authentication-Results | mail.archlinux.org; auth=pass smtp.auth=felixonmars smtp.mailfrom=felixonmars@archlinux.org |
| X-Mailing-List | <debian-python@lists.debian.org> archive/latest/20367 |
| List-ID | <debian-python.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-python/> |
| List-Archive | https://lists.debian.org/msgid-search/cbf87064-e35f-2872-cfd1-3707ab77603b@archlinux.org |
| Approved | robomod@news.nic.it |
| Lines | 111 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Cc | debian-python <debian-python@lists.debian.org> |
| X-Original-Date | Wed, 5 Oct 2022 14:28:56 +0300 |
| X-Original-Message-ID | <cbf87064-e35f-2872-cfd1-3707ab77603b@archlinux.org> |
| X-Original-References | <CAKq8=3LoQ6uAV6kWNiVu49kAk3wrsHuzVMNJ2je2bS0twxKvWA@mail.gmail.com> <eec94ea5-7036-1019-48c4-e51d8a0c8b5b@archlinux.org> <20221005110221.5ctgsxgzp2vnk5ed@debian> |
| Xref | csiph.com linux.debian.maint.python:14518 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On 10/5/22 14:02, Bo YU wrote:
> ```
> vimer@dev:~/build/rfs/packages/test_dir$ sudo pip3 install
> sphinxcontrib-ditaa
> Collecting sphinxcontrib-ditaa
> Using cached sphinxcontrib-ditaa-1.0.1.tar.gz (7.5 kB)
> Preparing metadata (setup.py) ... error
> error: subprocess-exited-with-error
>
> × python setup.py egg_info did not run successfully.
> │ exit code: 1
> ╰─> [30 lines of output]
> Traceback (most recent call last):
> File "<string>", line 2, in <module>
> File "<pip-setuptools-caller>", line 34, in <module>
> File
> "/tmp/pip-install-c2wygkxs/sphinxcontrib-ditaa_10e1c64028af47e59b8fc5bf20b6901c/setup.py", line 8, in <module>
> setup(
> File "/usr/lib/python3/dist-packages/setuptools/__init__.py",
> line 86, in setup
> _install_setup_requires(attrs)
> File "/usr/lib/python3/dist-packages/setuptools/__init__.py",
> line 75, in _install_setup_requires
> dist = MinimalDistribution(attrs)
> File "/usr/lib/python3/dist-packages/setuptools/__init__.py",
> line 57, in __init__
> super().__init__(filtered)
> File "/usr/lib/python3/dist-packages/setuptools/dist.py", line
> 474, in __init__
> for ep in
> metadata.entry_points(group='distutils.setup_keywords'):
> File "/usr/lib/python3.10/importlib/metadata/__init__.py", line
> 1009, in entry_points
> return SelectableGroups.load(eps).select(**params)
> File "/usr/lib/python3.10/importlib/metadata/__init__.py", line
> 459, in load
> ordered = sorted(eps, key=by_group)
> File "/usr/lib/python3.10/importlib/metadata/__init__.py", line
> 1006, in <genexpr>
> eps = itertools.chain.from_iterable(
> File "/usr/lib/python3.10/importlib/metadata/_itertools.py",
> line 16, in unique_everseen
> k = key(element)
> File "/usr/lib/python3.10/importlib/metadata/__init__.py", line
> 941, in _normalized_name
> return self._name_from_stem(stem) or super()._normalized_name
> File "/usr/lib/python3.10/importlib/metadata/__init__.py", line
> 622, in _normalized_name
> return Prepared.normalize(self.name)
> File "/usr/lib/python3.10/importlib/metadata/__init__.py", line
> 871, in normalize
> return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
> File "/usr/lib/python3.10/re.py", line 209, in sub
> return _compile(pattern, flags).sub(repl, string, count)
> TypeError: expected string or bytes-like object
> [end of output]
>
> note: This error originates from a subprocess, and is likely not a
> problem with pip.
> error: metadata-generation-failed
>
> × Encountered error while generating package metadata.
> ╰─> See above for output.
>
> ```
You are right. The traceback is indeed different but more similar to
this one, probably: https://github.com/pypa/setuptools/issues/3273
I have tried to make an empty .dist-info dir and got the very similar
result to yours.
The following command may help to locate the actual offending package:
strace -eopenat python -c "from importlib.metadata import entry_points;
print(entry_points(group='sphinx.builders'))"
--
Regards,
Felix Yan
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to fix TypeError: expected string or bytes-like object ? Bo YU <tsu.yubo@gmail.com> - 2022-10-05 11:50 +0200
Re: how to fix TypeError: expected string or bytes-like object ? Felix Yan <felixonmars@archlinux.org> - 2022-10-05 12:50 +0200
Re: how to fix TypeError: expected string or bytes-like object ? Bo YU <tsu.yubo@gmail.com> - 2022-10-05 13:10 +0200
Re: how to fix TypeError: expected string or bytes-like object ? Felix Yan <felixonmars@archlinux.org> - 2022-10-05 13:30 +0200
Re: how to fix TypeError: expected string or bytes-like object ? Bo YU <tsu.yubo@gmail.com> - 2022-10-06 03:50 +0200
csiph-web