Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #14516

Re: how to fix TypeError: expected string or bytes-like object ?

From Felix Yan <felixonmars@archlinux.org>
Newsgroups linux.debian.maint.python
Subject Re: how to fix TypeError: expected string or bytes-like object ?
Date 2022-10-05 12:50 +0200
Message-ID <Fda8p-cbZB-3@gated-at.bofh.it> (permalink)
References <Fd9cl-cbqD-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 10/5/22 12:47, Bo YU wrote:
> hi,
> (maybe this is off topic on this list)
> When I want to run sphinx cmd on my pc, I got the error:
> ```
> vimer@dev:~/build/rfs/packages/test_dir$ cat /tmp/sphinx-err-etgbo9tg.log
> # Sphinx version: 4.5.0
> # Python version: 3.10.7 (CPython)
> # Docutils version: 0.17.1 release
> # Jinja2 version: 3.0.3
> # Last messages:
> 
> # Loaded extensions:
> Traceback (most recent call last):
>    File "/usr/lib/python3/dist-packages/sphinx/cmd/build.py", line 272,
> in build_main
>      app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
>    File "/usr/lib/python3/dist-packages/sphinx/application.py", line
> 220, in __init__
>      self.preload_builder(buildername)
>    File "/usr/lib/python3/dist-packages/sphinx/application.py", line
> 297, in preload_builder
>      self.registry.preload_builder(self, name)
>    File "/usr/lib/python3/dist-packages/sphinx/registry.py", line 142,
> in preload_builder
>      builder_entry_points = entry_points(group='sphinx.builders')
>    File "/usr/lib/python3/dist-packages/importlib_metadata/__init__.py",
> line 1047, in entry_points
>      return SelectableGroups.load(eps).select(**params)
>    File "/usr/lib/python3/dist-packages/importlib_metadata/__init__.py",
> line 477, in load
>      ordered = sorted(eps, key=by_group)
>    File "/usr/lib/python3/dist-packages/importlib_metadata/__init__.py",
> line 1044, in <genexpr>
>      eps = itertools.chain.from_iterable(
>    File "/usr/lib/python3/dist-packages/importlib_metadata/_itertools.py",
> line 16, in unique_everseen
>      k = key(element)
>    File "/usr/lib/python3/dist-packages/importlib_metadata/__init__.py",
> line 961, in _normalized_name
>      or super()._normalized_name
>    File "/usr/lib/python3/dist-packages/importlib_metadata/__init__.py",
> line 628, in _normalized_name
>      return Prepared.normalize(self.name)
>    File "/usr/lib/python3/dist-packages/importlib_metadata/__init__.py",
> line 883, 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
> ```

Looks like this: https://github.com/sphinx-doc/sphinx/issues/10339

Are you using the rinohtype extension too?

-- 
Regards,
Felix Yan

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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