Skip to content

Fresh pip install pycardano is broken: cbor2 6.x removed CBORDecodeValueError #498

Description

@pmcorcoran

Describe the bug
cbor2 6.0.0 removed CBORDecodeValueError as a
backward-incompatible change. pyproject.toml declares cbor2 = ">=5.6.5" , so pip installs 6.x alongside a cbor2pure that still imports the 5.x name.

To Reproduce
clean venv, Python 3.12, pip install pycardano, then import pycardano.

Logs
Resolves to pycardano 0.19.2, cbor2 6.1.3, cbor2pure 5.8.0, and raises:

File "/.venv/lib/python3.12/site-packages/cbor2pure/init.py", line 6, in
from cbor2 import CBORDecodeValueError as CBORDecodeValueError
ImportError: cannot import name 'CBORDecodeValueError' from 'cbor2' (/.venv/lib/python3.12/site-packages/cbor2/init.py). Did you mean: 'CBOREncodeValueError'?

Environment and software version (please complete the following information):

  • OS: Ubuntu 24.04.4 LTS
  • PyCardano Version 0.19.2
  • Python version 3.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions