Skip to content

Commit d879023

Browse files
committed
fix URL string handling
1 parent 99614ae commit d879023

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bioformats/formatreader.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -550,14 +550,14 @@ class ImageReader(object):
550550
def __init__(self, path=None, url=None, perform_init=True):
551551
self.stream = None
552552
file_scheme = "file:"
553-
self.url = url
554553
self.using_temp_file = False
555-
if url is not None and url.lower().startswith(file_scheme):
556-
utf8_url = url2pathname(url[len(file_scheme):])
557-
if isinstance(utf8_url, str):
558-
path = str(utf8_url, 'utf-8')
559-
else:
560-
path = utf8_url
554+
555+
if url is not None:
556+
url = str(url)
557+
if url.lower().startswith(file_scheme):
558+
url = url2pathname(url[len(file_scheme):])
559+
path = url
560+
561561
self.path = path
562562
if path is None:
563563
if url.lower().startswith("omero:"):

0 commit comments

Comments
 (0)