Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.11 incompatability Framerate error: for field F23_98 is not allowed: use default_factory #16

Open
russellaugust opened this issue Apr 5, 2023 · 1 comment

Comments

@russellaugust
Copy link

Receiving this error in Python3.11.

  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 1210, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 958, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/dataclasses.py", line 815, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'vtc._framerate.Framerate'> for field F23_98 is not allowed: use default_factory

Works fine in Python 3.10. Looks like something may have broken in 3.11.

@russellaugust russellaugust changed the title Framerate error: for field F23_98 is not allowed: use default_factory Python 3.11 incompatability Framerate error: for field F23_98 is not allowed: use default_factory Apr 5, 2023
@peake100
Copy link
Contributor

Interesting. Will need to take a look. Sorry, I am just seeing this notification now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants