No need to re-serialize bytes (they're already serialized).
MODIFY
pangeo_forge_recipes/serialization.py
pangeo_forge_recipes/serialization.py
@@ -20,6 +20,8 @@ def either_encode_or_hash(obj: Any):
return obj.sha256.hex()
elif inspect.isfunction(obj):
return inspect.getsource(obj)
+ elif isinstance(obj, bytes):
+ return obj.hex()
raise TypeError(f"object of type {type(obj).__name__} not serializable")

No need to re-serialize bytes (they're already serialized).