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

cannot serialize under some circumstances #277

Open
eroux opened this issue Sep 11, 2024 · 0 comments
Open

cannot serialize under some circumstances #277

eroux opened this issue Sep 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@eroux
Copy link
Contributor

eroux commented Sep 11, 2024

In https://github.com/OpenPecha/Norbu-Keta-eText-import

I get

  File "/home/admin/Toolkit/openpecha/core/pecha.py", line 334, in save_meta
    dump_yaml(self.meta.dict(exclude_none=True), self.meta_fn)
  File "/home/admin/Toolkit/openpecha/utils.py", line 107, in dump_yaml
    yaml.dump(
  File "/home/admin/pvenv/lib/python3.11/site-packages/yaml/__init__.py", line 253, in dump
    return dump_all([data], stream, Dumper=Dumper, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/pvenv/lib/python3.11/site-packages/yaml/__init__.py", line 241, in dump_all
    dumper.represent(data)
  File "/home/admin/pvenv/lib/python3.11/site-packages/yaml/representer.py", line 27, in represent
    node = self.represent_data(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/pvenv/lib/python3.11/site-packages/yaml/representer.py", line 48, in represent_data
    node = self.yaml_representers[data_types[0]](self, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/pvenv/lib/python3.11/site-packages/yaml/representer.py", line 207, in represent_dict
    return self.represent_mapping('tag:yaml.org,2002:map', data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/pvenv/lib/python3.11/site-packages/yaml/representer.py", line 118, in represent_mapping
    node_value = self.represent_data(item_value)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/pvenv/lib/python3.11/site-packages/yaml/representer.py", line 58, in represent_data
    node = self.yaml_representers[None](self, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/pvenv/lib/python3.11/site-packages/yaml/representer.py", line 231, in represent_undefined
    raise RepresenterError("cannot represent an object", data)
yaml.representer.RepresenterError: ('cannot represent an object', AnyHttpUrl('https://github.com/OpenPecha/Norbu-Keta-eText-import/blob/main/norbu_ketaka_parser.py', ))

@eroux eroux added the bug Something isn't working label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant