Skip to content

Comments

Fix cwd-dependent WebAPP paths causing TemplateNotFound#32

Open
alwaysalearner1234 wants to merge 1 commit intoEAPD-DRB:mac-portfrom
alwaysalearner1234:patch-2
Open

Fix cwd-dependent WebAPP paths causing TemplateNotFound#32
alwaysalearner1234 wants to merge 1 commit intoEAPD-DRB:mac-portfrom
alwaysalearner1234:patch-2

Conversation

@alwaysalearner1234
Copy link

Fix cwd-dependent WebAPP paths causing TemplateNotFound

Summary

Fixes incorrect WebAPP path resolution that depended on the current working directory.
When the app was launched from API/, Flask attempted to load templates from API/WebAPP/, causing:
jinja2.exceptions.TemplateNotFound: index.html

Changes

  • Updated Config.py to resolve paths using Path(__file__).resolve() instead of Path('WebAPP')
  • Updated app.py to configure template_folder and static_folder relative to the project root
  • Fixed typo in EmissionActivityRatio parameter definition

Result

  • / consistently renders WebAPP/index.html
  • Execution location no longer affects path resolution
  • Improved portability across macOS, Linux, and Windows

Updated template and static directory paths to be independent of the current working directory.
@SeaCelo SeaCelo changed the base branch from main to mac-port February 25, 2026 17:59
@SeaCelo
Copy link
Collaborator

SeaCelo commented Feb 25, 2026

Retargeted to mac-port per the macOS integration track: #51.
We are validating Mac/cross-platform changes in mac-port first, then merging mac-port -> main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants