Skip to content
Snippets Groups Projects

Attempt StringIO after failed BytesIO file read

All threads resolved!
+ 4
1
@@ -510,7 +510,10 @@ def get_input_factory(args):
@@ -510,7 +510,10 @@ def get_input_factory(args):
input_stream = BytesIO(Util.read_url(args.input_url))
input_stream = BytesIO(Util.read_url(args.input_url))
except TypeError as e:
except TypeError as e:
print(str(e), file=sys.stderr)
print(str(e), file=sys.stderr)
print("Warning: reading url as BytesIO failed; attempting StringIO", file=sys.stderr)
print(
 
"Warning: reading url as BytesIO failed; attempting StringIO",
 
file=sys.stderr,
 
)
input_stream = StringIO(Util.read_url(args.input_url))
input_stream = StringIO(Util.read_url(args.input_url))
input_type = args.input
input_type = args.input
if input_type == "edge":
if input_type == "edge":
Loading