Skip to content

Commit 241ddea

Browse files
committed
Troubleshoot
1 parent d1e5a23 commit 241ddea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

microhapulator/profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313

1414
from collections import defaultdict
15+
from importlib.resources import files
1516
from io import StringIO
1617
import json
1718
import jsonschema
1819
from microhapulator import __version__
1920
from microhapulator import open as mhopen
2021
from microhapulator.happer.mutate import mutate
2122
from numpy.random import choice
22-
from pkg_resources import resource_filename
2323
import pandas as pd
2424
from pathlib import Path
2525
import sys
@@ -32,7 +32,7 @@ class RandomMatchError(ValueError):
3232

3333

3434
def load_schema():
35-
with mhopen(resource_filename("microhapulator", "data/profile-schema.json"), "r") as fh:
35+
with mhopen(files("microhapulator") / "data/profile-schema.json", "r") as fh:
3636
return json.load(fh)
3737

3838

0 commit comments

Comments
 (0)