Skip to content

Commit d19a966

Browse files
lqdevCopilot
andcommitted
fix: use absolute import for nl_to_sparql in function_app.py
Relative imports (from .nl_to_sparql) fail in Azure Functions v2 because the api/ directory is not treated as a Python package. The function app root is added to sys.path, so absolute imports work. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 71451c5 commit d19a966

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/function_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import rdflib
1515
from rdflib import Dataset, Graph
1616

17-
from .nl_to_sparql import translate, validate_sparql, enforce_safety
17+
from nl_to_sparql import translate, validate_sparql, enforce_safety
1818

1919
app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
2020

0 commit comments

Comments
 (0)