Skip to content

Commit

Permalink
Fix kerchunk append bug
Browse files Browse the repository at this point in the history
Was due to casting lazy reference set to dict
  • Loading branch information
martindurant committed Jun 24, 2024
1 parent afa2113 commit c4aba2e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions fsspec/implementations/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,10 +935,13 @@ def _process_references(self, references, template_overrides=None):

def _process_references0(self, references):
"""Make reference dict for Spec Version 0"""
references = {
key: json.dumps(val) if isinstance(val, dict) else val
for key, val in references.items()
}
if isinstance(references, dict):
# do not do this for lazy/parquet backend, which will not make dicts,
# but must remain writable in the original object
references = {
key: json.dumps(val) if isinstance(val, dict) else val
for key, val in references.items()
}
self.references = references

def _process_references1(self, references, template_overrides=None):
Expand Down

0 comments on commit c4aba2e

Please sign in to comment.