diff --git a/physics/physics_factory.py b/physics/physics_factory.py index eb311fc2..f2d983d1 100644 --- a/physics/physics_factory.py +++ b/physics/physics_factory.py @@ -12,7 +12,7 @@ class PhysicsFactory: """ PhysicsFactor class """ - def __init__(self, handler, city, base_path=Path(Path.cwd().parent / 'libs/data/physics')): + def __init__(self, handler, city, base_path=Path(Path(__file__).parent.parent / 'data/physics')): self._handler = '_' + handler.lower().replace(' ', '_') self._city = city self._base_path = base_path diff --git a/usage/usage_feeders/us_base_usage_parameters.py b/usage/usage_feeders/us_base_usage_parameters.py index f214bfd8..847dc74b 100644 --- a/usage/usage_feeders/us_base_usage_parameters.py +++ b/usage/usage_feeders/us_base_usage_parameters.py @@ -19,7 +19,7 @@ class UsBaseUsageParameters: self._city = city # todo: control not archetype found # ToDo: this is using the german library as a temporary approach, need to use/define a library for US - path = str(Path.cwd() / 'data/usage/de_library.xml') + path = str(Path(__file__).parent.parent.parent / 'data/usage/de_library.xml') print('usage:', path) with open(path) as xml: self._library = xmltodict.parse(xml.read(), force_list='zoneUsageVariant')