Source: python-virtualenv
Version: 20.4.0+ds-2
Severity: normal
X-Debbugs-Cc: florian.laro...@gmail.com

Dear Maintainer,

with Debian testing (Debian 11 is probably the same), I get the
following problem:

virtualenv env
. env/bin/activate
pip list --outdated
ERROR: Exception:
Traceback (most recent call last):
  File 
"/home/flaroche/data/n/env/lib/python3.9/site-packages/pip/_internal/cli/base_command.py",
 line 223, in _main
    status = self.run(options, args)
  File 
"/home/flaroche/data/n/env/lib/python3.9/site-packages/pip/_internal/commands/list.py",
 line 175, in run
    packages = self.get_outdated(packages, options)
  File 
"/home/flaroche/data/n/env/lib/python3.9/site-packages/pip/_internal/commands/list.py",
 line 184, in get_outdated
    return [
  File 
"/home/flaroche/data/n/env/lib/python3.9/site-packages/pip/_internal/commands/list.py",
 line 184, in <listcomp>
    return [
  File 
"/home/flaroche/data/n/env/lib/python3.9/site-packages/pip/_internal/commands/list.py",
 line 237, in iter_packages_latest_infos
    for dist in map_multithread(latest_info, packages):
  File "/usr/lib/python3.9/multiprocessing/pool.py", line 870, in next
    raise value
  File "/usr/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File 
"/home/flaroche/data/n/env/lib/python3.9/site-packages/pip/_internal/commands/list.py",
 line 214, in latest_info
    all_candidates = finder.find_all_candidates(dist.key)
  File 
"/home/flaroche/data/n/env/lib/python3.9/site-packages/pip/_internal/index/package_finder.py",
 line 825, in find_all_candidates
    package_links = self.process_project_url(
  File 
"/home/flaroche/data/n/env/lib/python3.9/site-packages/pip/_internal/index/package_finder.py",
 line 793, in process_project_url
    page_links = list(parse_links(html_page))
  File 
"/home/flaroche/data/n/env/lib/python3.9/site-packages/pip/_internal/index/collector.py",
 line 324, in wrapper_wrapper
    return list(fn(page))
  File 
"/home/flaroche/data/n/env/lib/python3.9/site-packages/pip/_internal/index/collector.py",
 line 335, in parse_links
    document = html5lib.parse(
  File 
"/usr/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl/html5lib/html5parser.py",
 line 44, in parse
    tb = treebuilders.getTreeBuilder(treebuilder)
  File 
"/usr/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl/html5lib/treebuilders/__init__.py",
 line 85, in getTreeBuilder
    return etree.getETreeModule(implementation, **kwargs).TreeBuilder
AttributeError: module 'html5lib.treebuilders.etree' has no attribute 
'getETreeModule'





To work around this problem, I install html5lib locally and then rename
the wheel version of it:

pip install html5lib
sudo mv /usr/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl 
/usr/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl.old
pip list --outdated


best regards,

Florian La Roche




-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.14.0-trunk-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_USER, TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Reply via email to