indygreg / indygreg/python-zstandard

AttributeError: module 'zstandard' has no attribute '__version__'

Open
#230 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
642
Forks
116
Avg merge
1d 14h
Merged PRs (30d)
5

Description

Hi, I did the conda update this morning, with the command conda update conda, but at the end I got this message:

Traceback (most recent call last):
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/exceptions.py", line 1124, in __call__
return func(*args, **kwargs)
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/cli/main.py", line 57, in main_subshell
p = generate_parser()
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/cli/conda_argparse.py", line 40, in generate_parser
p = ArgumentParser(
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/cli/conda_argparse.py", line 117, in __init__
self._subcommands = context.plugin_manager.get_hook_results("subcommands")
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/base/context.py", line 422, in plugin_manager
from ..plugins.manager import get_plugin_manager
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/plugins/__init__.py", line 3, in
from .hookspec import hookimpl # noqa: F401
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/plugins/hookspec.py", line 10, in
from .types import CondaSolver, CondaSubcommand, CondaVirtualPackage
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/plugins/types.py", line 6, in
from ..core.solve import Solver
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/core/solve.py", line 15, in
from .index import get_reduced_index, _supplement_index_with_system
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/core/index.py", line 10, in
from .package_cache_data import PackageCacheData
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/core/package_cache_data.py", line 22, in
from .path_actions import CacheUrlAction, ExtractPackageAction
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/core/path_actions.py", line 28, in
from ..gateways.connection.download import download
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/gateways/connection/__init__.py", line 6, in
from requests import ConnectionError, HTTPError, Session
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/requests/__init__.py", line 43, in
import urllib3
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/urllib3/__init__.py", line 18, in
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/urllib3/connectionpool.py", line 15, in
from ._request_methods import RequestMethods
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/urllib3/_request_methods.py", line 10, in
from .response import BaseHTTPResponse
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/urllib3/response.py", line 38, in
map(int, re.search(r"^([0-9]+)\.([0-9]+)", zstd.__version__).groups()) # type: ignore[union-attr]
AttributeError: module 'zstandard' has no attribute '__version__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/bioinfo/mambaforge-pypy3/bin/conda", line 13, in
sys.exit(main())
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/cli/main.py", line 112, in main
return conda_exception_handler(main, *args, **kwargs)
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/exceptions.py", line 1424, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/exceptions.py", line 1127, in __call__
return self.handle_exception(exc_val, exc_tb)
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/exceptions.py", line 1167, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb)
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/exceptions.py", line 1178, in handle_unexpected_exception
self.print_unexpected_error_report(error_report)
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/exceptions.py", line 1240, in print_unexpected_error_report
from .cli.main_info import get_env_vars_str, get_main_info_str
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/cli/main_info.py", line 17, in
from ..core.index import _supplement_index_with_system
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/core/index.py", line 10, in
from .package_cache_data import PackageCacheData
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/core/package_cache_data.py", line 22, in
from .path_actions import CacheUrlAction, ExtractPackageAction
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/core/path_actions.py", line 28, in
from ..gateways.connection.download import download
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/conda/gateways/connection/__init__.py", line 6, in
from requests import ConnectionError, HTTPError, Session
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/requests/__init__.py", line 43, in
import urllib3
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/urllib3/__init__.py", line 18, in
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/urllib3/connectionpool.py", line 15, in
from ._request_methods import RequestMethods
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/urllib3/_request_methods.py", line 10, in
from .response import BaseHTTPResponse
File "/home/bioinfo/mambaforge-pypy3/lib/pypy3.9/site-packages/urllib3/response.py", line 38, in
map(int, re.search(r"^([0-9]+)\.([0-9]+)", zstd.__version__).groups()) # type: ignore[union-attr]
AttributeError: module 'zstandard' has no attribute '__version__'

now if I try to create a virtual environment or install something with conda I get the same message

My OS is UBUNTU 20.04 LTS

How can fix the problem?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with urllib3/connectionpool.py and response.py, where the traceback reads zstandard.__version__, then inspect how the installed zstandard module is exposed after a conda update. Reproduce the failure through the conda entry point and verify that creating an environment or installing a package completes without the traceback.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.