Skip to content

TypeError: cannot inherit frozen dataclass from a non-frozen one (during import of pyam) #889

@lucyhager

Description

@lucyhager

Hi guys,

I encountered a TypeError when trying to import pyam in my environment this morning. My installation code looks like this:
!pip install ixmp4 numpy==1.23.5
!pip install pyam-iamc numpy==1.23.5
!pip install dask_expr numpy==1.23.5
import ixmp4
import pyam

Here’s the error trace:
TypeError: cannot inherit frozen dataclass from a non-frozen one

The error appears to occur within the Python dataclasses module, specifically:
TypeError: cannot inherit frozen dataclass from a non-frozen one

Any guidance on resolving this or insight into potential version incompatibilities would be much appreciated.

Thank you!

...

TypeError Traceback (most recent call last)
in <cell line: 5>()
3 get_ipython().system('pip install dask_expr numpy==1.23.5')
4 import ixmp4
----> 5 import pyam

10 frames
/usr/lib/python3.10/dataclasses.py in _process_class(cls, init, repr, eq, order, unsafe_hash, frozen, match_args, kw_only, slots)
988 # Raise an exception if we're frozen, but none of our bases are.
989 if not any_frozen_base and frozen:
--> 990 raise TypeError('cannot inherit frozen dataclass from a '
991 'non-frozen one')
992

TypeError: cannot inherit frozen dataclass from a non-frozen one

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions