<@U091TTGA07P> Hello, team! I am new to elementar...
# ask-elementary-ai
n
@Sangeetha Hello, team! I am new to elementary. When I run
edr report
I am getting the below error, and in my dbt project the path exist is
dbt_packages\\elementary\\integration_tests\\deprecated_tests\\data\\training\\any_type_column_anomalies_training.csv
Error is:
Copy code
elementary.exceptions.exceptions.DbtCommandError: Failed to run dbt command.
[Errno 2] No such file or directory: 'dbt_packages\\dbt-data-reliability-0.18.3\\integration_tests\\deprecated_tests\\data\\training\\any_type_column_anomalies_training.csv'
Could someone help me what am I missing here?
k
A message from kapa.ai
This error is a common issue when running
edr report
with Elementary, especially on local or Windows environments. The error message indicates that the CLI is looking for a file in a path like
dbt_packages\dbt-data-reliability-0.18.3\...
, but your actual folder is named
dbt_packages\elementary\...
. This mismatch can happen due to several reasons: ### Possible Causes & Solutions 1. Package Version or Path Mismatch - Elementary's internal dbt project sometimes expects the package folder to be named
dbt-data-reliability-<version>
, but dbt may install it as
elementary
. This can cause the CLI to look for files in the wrong directory. - Try running:
Copy code
dbt clean      dbt deps
This will remove and reinstall your dbt packages, which sometimes resolves path mismatches. Make sure your
packages.yml
references the correct version of the Elementary dbt package. 2. Permissions or Incomplete Installation - If the CLI does not have permission to write to the Python path, the package installation may be incomplete, leading to missing files and this error. Ensure you have write permissions to your Python and project directories. Running your terminal as an administrator can help on Windows systems. - See more on this in [this GitHub issue](https://github.com/elementary-data/elementary/issues/1261). 3. Python Path Issues (Especially on Windows) - Sometimes, the Python environment used by
edr
is not the same as your dbt project, causing it to look in the wrong place for packages. Make sure you are running
edr
from the same virtual environment where dbt and Elementary are installed. - Creating and activating a virtual environment in your project directory, then reinstalling dbt and elementary, often resolves these issues. See step-by-step instructions in [this Slack thread](https://slack.com/archives/C02CTC89LAX/p1701285825706579). 4. Long File Paths on Windows - Windows has a default file path length limit, which can cause issues when dbt or Elementary tries to access deeply nested files. Try moving your project to a directory with a shorter path, such as
C:\project_name
, and rerun the commands. This has resolved similar issues for other users ([see here](https://slack.com/archives/C02CTC89LAX/p1721229752228569)). 5. Manual Cleanup - If you have previously installed different versions of Elementary, there may be leftover folders in
dbt_packages
. Manually delete the
dbt_packages
folder, then run
dbt deps
again to ensure a clean install ([see here](https://slack.com/archives/C02CTC89LAX/p1698772442511589)). ### Summary of Steps to Try 1. Activate your virtual environment (if not already). 2. Run
dbt clean
and
dbt deps
. 3. Ensure your
packages.yml
references the correct Elementary version. 4. Check for and resolve any permission issues. 5. Try running your project from a shorter file path if on Windows. 6. If the problem persists, ensure that
edr
is using the same Python environment as your dbt project. If after these steps the error persists, please provide the output of
pip list
and the contents of your
edr.log
file for further troubleshooting. --- References: - [Slack thread: FileNotFoundError troubleshooting](https://slack.com/archives/C02CTC89LAX/p1701285825706579) - [Slack thread: Path mismatch and permissions](https://slack.com/archives/C02CTC89LAX/p1698772442511589) - [GitHub issue: Local environment and permissions](https://github.com/elementary-data/elementary/issues/1261) - [Slack thread: Windows path length issue](https://slack.com/archives/C02CTC89LAX/p1721229752228569)