Skip to content

Commit 7fb10b7

Browse files
committed
Make ISIC tree file path dependent on AB instead of CWD
1 parent 208f5cf commit 7fb10b7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

activity_browser/ui/tables/models/inventory.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from PySide2.QtCore import QModelIndex, Qt, Slot
1212
from PySide2.QtWidgets import QApplication
1313

14+
import activity_browser
1415
from activity_browser import log, project_settings
1516
from activity_browser.bwutils import AB_metadata
1617
from activity_browser.bwutils import commontasks as bc
@@ -251,12 +252,12 @@ def get_isic_tree(self) -> Tuple[dict, dict, dict]:
251252
tree_numeric_order: keys are classification number, values are the row number in file
252253
"""
253254
path = os.path.join(
254-
os.getcwd(),
255-
"activity_browser",
255+
os.path.dirname(os.path.abspath(activity_browser.__file__)),
256256
"static",
257257
"database_classifications",
258258
"ISIC_Rev_4_english_structure.txt",
259259
)
260+
260261
df = pd.read_csv(path)
261262

262263
tree_data = {}

0 commit comments

Comments
 (0)