Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

fix: Local resources path resolving

Clémence Lesné5247f006e5a2
diff --git a/helpers/resources.py b/helpers/resources.py
index 550cdf1..71f780b 100644
--- a/helpers/resources.py
+++ b/helpers/resources.py
@@ -1,3 +1,4 @@
+import os
from functools import lru_cache
from os import path
from pathlib import Path
@@ -8,4 +9,14 @@ def resources_dir(folder: str) -> str:
"""
Get the absolute path to the resources folder.
"""
- return str(Path(path.join("..", "resources", folder)).resolve().absolute())
+ return str(
+ Path(
+ path.join(
+ os.path.abspath(os.getcwd()),
+ "resources",
+ folder,
+ )
+ )
+ .resolve()
+ .absolute()
+ )