Skip to content

Commit 9ce9ac3

Browse files
committed
fixing the request module import
1 parent 38a1233 commit 9ce9ac3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/py-opentimelineio/opentimelineio/url_utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import os
77
import urllib
8+
from urllib import request
89
import pathlib
910

1011

@@ -23,7 +24,7 @@ def url_from_filepath(fpath):
2324
try:
2425
# appears to handle absolute windows paths better, which are absolute
2526
# and start with a drive letter.
26-
return urllib.urlparse.unquote(pathlib.PurePath(fpath).as_uri())
27+
return urllib.parse.unquote(pathlib.PurePath(fpath).as_uri())
2728
except ValueError:
2829
# scheme is "file" for absolute paths, else ""
2930
scheme = "file" if os.path.isabs(fpath) else ""
@@ -63,7 +64,7 @@ def filepath_from_url(urlstr):
6364

6465
# Convert the parsed URL to a path
6566
filepath = pathlib.PurePath(
66-
urllib.request.url2pathname(decoded_parsed_path)
67+
request.url2pathname(decoded_parsed_path)
6768
)
6869

6970
# If the network location is a window drive, reassemble the path

0 commit comments

Comments
 (0)