Skip to content

Commit 7966841

Browse files
committed
fixup! switch from deprecated pkg_resources to importlib_resources
1 parent 36d52f5 commit 7966841

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bear/data_file.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ def get_path(file_url):
1515
# try to find the file in a couple of different places
1616
for package, prefix in ("bear", "data/"), ("visr_bear_data", ""):
1717
try:
18-
full_path = importlib_resources.files(package) / fname / path
18+
full_path = importlib_resources.files(package) / prefix / path
1919
except ModuleNotFoundError:
2020
continue
2121

2222
if full_path.is_file():
23-
return full_path
23+
return str(full_path)
2424
else:
2525
raise Exception(f"resource '{path}' not found")
2626
elif file_url.startswith("file:"):

0 commit comments

Comments
 (0)