Add code to identify the file path, which is key to find the dima submodule.

This commit is contained in:
2025-01-29 09:20:10 +01:00
parent 9bb56cd3da
commit 5b9e2ffa43

View File

@ -1,5 +1,17 @@
import sys, os import sys, os
try:
thisFilePath = os.path.abspath(__file__)
print(thisFilePath)
except NameError:
print("[Notice] The __file__ attribute is unavailable in this environment (e.g., Jupyter or IDLE).")
print("When using a terminal, make sure the working directory is set to the script's location to prevent path issues (for the DIMA submodule)")
#print("Otherwise, path to submodule DIMA may not be resolved properly.")
thisFilePath = os.getcwd() # Use current directory or specify a default
dimaPath = os.path.normpath(os.path.join(thisFilePath, "..",'..')) # Move up to project root
print(dimaPath)
import pandas as pd import pandas as pd
import numpy as np import numpy as np
@ -176,6 +188,8 @@ app.layout = dbc.Container([
], ],
) )
#@app.callback()
@app.callback( @app.callback(
Output('memory-output','data'), Output('memory-output','data'),
Output('timeseries-plot', 'figure'), Output('timeseries-plot', 'figure'),