Repository: truera/trulens
Issue: [BUG] Dashboard auto closed, leading "RuntimeError: Dashboard failed to start in time. Please inspect dashboard logs for additional information."
Root cause: Configuration Error

**Bug Description**
Run the program, then Starting dashboard, after a while it automatically shows Dashboard closed. Dashboard closed. Then a RuntimeError appears.

**To Reproduce**
It was running perfectly before, until I transferred the project to another hard drive!

**Relevant Logs/Tracebacks**
🦑 Tru initialized with db url sqlite:///default.sqlite .
🛑 Secret keys may be written to the database. See the `database_redact_keys` option of `Tru` to prevent this.
✅ In Groundedness, input source will be set to __record__.app.query.rets.source_nodes[:].node.text.collect() .
✅ In Groundedness, input statement will be set to __record__.main_output or `Select.RecordOutput` .
✅ In Answer Relevance, input prompt will be set to __record__.main_input or `Select.RecordInput` .
✅ In Answer Relevance, input response will be set to __record__.main_output or `Select.RecordOutput` .
✅ In Context Relevance, input question will be set to __record__.main_input or `Select.RecordInput` .
✅ In Context Relevance, input context will be set to __record__.app.query.rets.source_nodes[:].node.text .
Starting dashboard ...
Config file already exists. Skipping writing process.
Credentials file already exists. Skipping writing process.
Dashboard closed.
Dashboard closed.
Traceback (most recent call last):
  File "G:\0_Code\PY_project\XX\LlamaIndex-Qwen2-7b\venvh\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-2-9c9f8d6402a3>", line 1, in <module>
    runfile('G:/0_Code/PY_project/XX/LlamaIndex-Qwen2-7b/Evaluating.py', wdir='G:/0_Code/PY_project/XX/LlamaIndex-Qwen2-7b')
  File "D:\PyCharm 2021.1.2\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "D:\PyCharm 2021.1.2\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "G:/0_Code/PY_project/XX/LlamaIndex-Qwen2-7b/Evaluating.py", line 88, in <module>
    tru.run_dashboard()
  File "G:\0_Code\PY_project\XX\LlamaIndex-Qwen2-7b\venvh\lib\site-packages\trulens_eval\tru.py", line 1214, in run_dashboard
    raise RuntimeError(
RuntimeError: Dashboard failed to start in time. Please inspect dashboard logs for additional information.

**Environment:**
- OS: [Windows 10]
- Python 3.10.11
- TruLens 0.33.0
- langchain 0.2.12
- pip 24.1.2

**My Code**
query_engine = model.query_engine
provider = fOpenAI(
    model_engine="gpt-4o-mini",
    **API_args
)
context = App.select_context(query_engine)  
tru = Tru()
tru.reset_database()
f_groundedness = (
    Feedback(provider.groundedness_measure_with_cot_reasons, name="Groundedness")
    .on(context.collect())
    .on_output()
)
f_qa_relevance = (
    Feedback(provider.relevance_with_cot_reasons, name="Answer Relevance")
    .on_input_output()
)
f_qs_relevance = (
    Feedback(provider.context_relevance_with_cot_reasons, name="Context Relevance")
    .on_input()
    .on(context)
    .aggregate(np.mean)
)

tru_query_engine_recorder = TruLlama(
    query_engine,
    app_id='XX',
    feedbacks=[f_groundedness,f_qa_relevance, f_qs_relevance]
)

questions = [
    "XXX",
    "XXX",
]
with tru_query_engine_recorder as recording:
    for question in questions:
        query_engine.query(question)

tru.run_dashboard()


Hi @Lyy0617 - can you try the following to close any existing dashboards first?

`tru.run_dashboard(force=True)`

Closing this for now. @Lyy0617 pls reopen if you need help