Repository: truera/trulens
Issue: Dashboard error before records ingested [BUG]
Root cause: Validation Gap

**Bug Description**
In the sample application, dashboard is not reporting records

**To Reproduce**
Run the TruLens Quickstart notebook in colab, after sending queries, session.get_leaderboard() lists records. But the dashboard when started is not listitng records

**Expected Behavior**
Dashboard should data

**Relevant Logs/Tracebacks**
Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. If the issue is related to the TruLens dashboard, please also include a screenshot.

This is the call stack for dashboard error
AttributeError: type object 'Record' has no attribute 'app_version'
Traceback:
File "/usr/local/lib/python3.12/dist-packages/trulens/dashboard/main.py", line 37, in <module>
    main()
File "/usr/local/lib/python3.12/dist-packages/trulens/dashboard/main.py", line 33, in main
    pg.run()
File "/usr/local/lib/python3.12/dist-packages/streamlit/navigation/page.py", line 300, in run
    exec(code, module.__dict__)  # noqa: S102
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/trulens/dashboard/tabs/Records.py", line 733, in <module>
    records_main()
File "/usr/local/lib/python3.12/dist-packages/trulens/dashboard/tabs/Records.py", line 729, in records_main
    render_records(app_name)
File "/usr/local/lib/python3.12/dist-packages/trulens/dashboard/tabs/Records.py", line 690, in render_records
    _show_no_records_error(app_name=app_name, app_versions=app_versions)
File "/usr/local/lib/python3.12/dist-packages/trulens/dashboard/utils/dashboard_utils.py", line 737, in _show_no_records_error
    otel_count, non_otel_count = _check_cross_format_records(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/trulens/dashboard/utils/dashboard_utils.py", line 724, in _check_cross_format_records
    query = query.where(db.orm.Record.app_version.in_(app_versions))  # type: ignore
                        ^^^^^^^^^^^^^^^^^^^^^^^^^

<img width="1290" height="744" alt="Image" src="https://github.com/user-attachments/assets/d0549606-b61e-4d35-9cf5-2780b9700261" />

**Environment:**

- OS: [e.g. MacOS, Windows] - Windows using google chrome
- Python Version - in colab
- TruLens version - using Quickstart sample
- Versions of other relevant installed libraries

**Additional Context**
Add any other context about the problem here.


<!-- Greeting -->
Hi @pdmendki! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the trulens team.

<!-- Answer -->
The dashboard error is happening because the code is trying to access an attribute called `app_version` on the `Record` class, but that attribute doesn't exist in your current environment. This usually points to a mismatch between the dashboard code and the backend or data model—either the dashboard expects a newer or older schema than what your records actually have.

Since `session.get_leaderboard()` works and shows records, your data is being stored correctly, but the dashboard's filtering logic is failing due to this missing attribute. The most likely cause is a version mismatch between the notebook (backend) and the dashboard components. Make sure both are running the same version of TruLens, ideally the latest one, and that your environment is consistent.

If you can't align the versions, you could try running both the notebook and dashboard in the same environment (for example, both in Colab or both locally) to avoid schema mismatches. If you recently upgraded or installed TruLens, double-check that all dependencies are up to date and that there are no leftover files from previous versions.

If you need to filter records or leaderboard results, try not specifying the app id when calling `get_leaderboard()` and `get_records_and_feedback()`—this workaround helped resolve a related issue for another user [see here](https://github.com/truera/trulens/issues/1884).

If the problem persists after checking versions and environment, you may need to review the definition of the `Record` class in your installed TruLens package to confirm whether `app_version` should exist, or look for recent changes in the release notes that might affect dashboard filtering logic.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/3363560f-5291-4fc1-80fc-0f4507883620?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/3363560f-5291-4fc1-80fc-0f4507883620?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/3363560f-5291-4fc1-80fc-0f4507883620?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/3363560f-5291-4fc1-80fc-0f4507883620?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3363560f-5291-4fc1-80fc-0f4507883620?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/3363560f-5291-4fc1-80fc-0f4507883620?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3363560f-5291-4fc1-80fc-0f4507883620?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/e16d1378-a540-46b6-bd0e-816c493d2aee/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/truera/trulens/issues/2235)

Hey @pdmendki - thanks for reporting!

This dashboard error shows up after registering an application version but before records are recorded. I've fixed the bug in https://github.com/truera/trulens/pull/2266.