You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/ansar/trial/foo.py", line 12, in <module>
print(yaml.unsafe_load(out))
^^^^^^^^^^^^^^^^^^^^^
File "/home/ansar/venvir/ml/lib64/python3.11/site-packages/yaml/__init__.py", line 145, in unsafe_load
return load(stream, UnsafeLoader)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ansar/venvir/ml/lib64/python3.11/site-packages/yaml/__init__.py", line 81, in load
return loader.get_single_data()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ansar/venvir/ml/lib64/python3.11/site-packages/yaml/constructor.py", line 51, in get_single_data
return self.construct_document(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ansar/venvir/ml/lib64/python3.11/site-packages/yaml/constructor.py", line 60, in construct_document
for dummy in generator:
File "/home/ansar/venvir/ml/lib64/python3.11/site-packages/yaml/constructor.py", line 620, in construct_python_object
state = self.construct_mapping(node, deep=deep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ansar/venvir/ml/lib64/python3.11/site-packages/yaml/constructor.py", line 218, in construct_mapping
return super().construct_mapping(node, deep=deep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ansar/venvir/ml/lib64/python3.11/site-packages/yaml/constructor.py", line 134, in construct_mapping
raise ConstructorError(None, None,
yaml.constructor.ConstructorError: expected a mapping node, but found scalar
in "<unicode string>", line 2, column 11:
instance: !!python/object:__main__.Bar
^
The text was updated successfully, but these errors were encountered:
Hello,
I want to get a dictionary of the form
{key: instance_of_a_class}
.I have the following
.py
file as an example:I get the following error:
The text was updated successfully, but these errors were encountered: