diff --git a/ox/cache.py b/ox/cache.py index 6b2f8d3..e5f3dc4 100644 --- a/ox/cache.py +++ b/ox/cache.py @@ -363,11 +363,11 @@ class FileCache(Cache): if not info['only_headers']: if info['compressed']: data = zlib.compress(data) - elif not isinstance(data, str): + elif not isinstance(data, bytes): data = data.encode('utf-8') with open(f, 'wb') as _f: _f.write(data) - with open(i, 'wb') as _i: + with open(i, 'w') as _i: json.dump(info, _i) if cache_path().startswith('fs:'):