-
-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
acknowledgedbugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededtyping
Description
with this input file here
I am seeing this error with a newly installed Python-3.14
It was working just fine with 3.13
In [3]: InventoryPdus.from_yaml("""
...: pdu_hosts: []
...: devices: []
...: """)
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
File ~/miniconda3/envs/rhubarbe/lib/python3.14/site-packages/dataclass_wizard/loader_selection.py:75, in fromdict(cls, d)
74 try:
---> 75 load = CLASS_TO_LOAD_FUNC[cls]
76 except KeyError:
KeyError: <class 'rhubarbe.inventorypdus.InventoryPdus'>
During handling of the above exception, another exception occurred:
TypeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 InventoryPdus.from_yaml("""
2 pdu_hosts: []
3 devices: []
4 """)
File ~/miniconda3/envs/rhubarbe/lib/python3.14/site-packages/dataclass_wizard/wizard_mixins.py:254, in YAMLWizard.from_yaml(cls, string_or_stream, decoder, **decoder_kwargs)
250 decoder = yaml.safe_load
252 o = decoder(string_or_stream, **decoder_kwargs)
--> 254 return fromdict(cls, o) if isinstance(o, dict) else fromlist(cls, o)
<snip>
File ~/miniconda3/envs/rhubarbe/lib/python3.14/annotationlib.py:205, in ForwardRef.evaluate(self, globals, locals, type_params, owner, format)
203 code = self.__forward_code__
204 try:
--> 205 return eval(code, globals=globals, locals=locals)
206 except Exception:
207 if not is_forwardref_format:
File <string>:1
TypeError: 'function' object is not subscriptableI'm eager to hear if this rings a bell
I can also turn this into a Minimal Reproducible Example, if it helps pinpointing the issue, just let me know
rnag
Metadata
Metadata
Assignees
Labels
acknowledgedbugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededtyping