diff --git a/src/omero/util/pydict_text_io.py b/src/omero/util/pydict_text_io.py index 97b76f122..a89901e72 100644 --- a/src/omero/util/pydict_text_io.py +++ b/src/omero/util/pydict_text_io.py @@ -47,7 +47,7 @@ def load(fileobj, filetype=None, single=True, session=None): :param session: If fileobj is an OriginalFile:ID a valid session is required """ - if not isinstance(fileobj, str): + if not isinstance(fileobj, (str, bytes)): raise Exception( 'Invalid type: fileobj must be a filename or json string')