Ryan Shadle
11/29/2023, 7:23 PMedr report in my dbt environment. Any way to mitigate this error? I'm on version 0.12.1
FileNotFoundError: [Errno 2] No such file or directory: 'dbt_packages\\dbt-data-reliability-0.12.0\\integration_tests\\deprecated_tests\\macros\\unit_tests\\test_adapter_specific_macros_have_default_implementation.sql'Noa Kurman
12/04/2023, 2:51 PMdbt run --select elementary and dbt test before?
Can you try running all again?
If it still doesn’t work your dbt.log and edr.log would help 🙂Ryan Shadle
12/04/2023, 7:20 PM2023-12-04 13:16:35 � INFO � Running with edr=0.13.0
2023-12-04 13:16:35 � INFO � Running dbt --log-format json deps --project-dir C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\elementary\monitor\dbt_project
2023-12-04 13:16:39 � INFO � Running with dbt=1.7.1
2023-12-04 13:16:39 � INFO � Updating lock file in file path: C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\elementary\monitor\dbt_project/package-lock.yml
2023-12-04 13:16:39 � INFO � Installing dbt-labs/dbt_utils
2023-12-04 13:16:39 � INFO � Installed from version 0.8.6
2023-12-04 13:16:39 � INFO � Updated version available: 1.1.1
2023-12-04 13:16:39 � INFO � Installing elementary-data/elementary
2023-12-04 13:16:39 � INFO � Encountered an error:
[Errno 2] No such file or directory: 'dbt_packages\\dbt-data-reliability-0.13.0\\integration_tests\\deprecated_tests\\macros\\unit_tests\\test_adapter_specific_macros_have_default_implementation.sql'
2023-12-04 13:16:39 � INFO � Traceback (most recent call last):
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\cli\requires.py", line 90, in wrapper
result, success = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\cli\requires.py", line 75, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\cli\requires.py", line 151, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\cli\requires.py", line 197, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\cli\main.py", line 492, in deps
results = task.run()
^^^^^^^^^^
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\task\deps.py", line 252, in run
package.install(self.project, renderer)
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\deps\registry.py", line 66, in install
self._install(project, renderer)
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\deps\base.py", line 121, in _install
connection_exception_retry(download_untar_fn, 5)
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\utils.py", line 607, in _connection_exception_retry
return fn()
^^^^
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\deps\base.py", line 133, in download_and_untar
system.untar_package(tar_path, deps_path, package_name)
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\site-packages\dbt\clients\system.py", line 500, in untar_package
tarball.extractall(dest_dir)
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\tarfile.py", line 2257, in extractall
self._extract_one(tarinfo, path, set_attrs=not tarinfo.isdir(),
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\tarfile.py", line 2324, in _extract_one
self._handle_fatal_error(e)
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\tarfile.py", line 2320, in _extract_one
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\tarfile.py", line 2403, in _extract_member
self.makefile(tarinfo, targetpath)
File "C:\Users\RyanShadle\AppData\Local\Programs\Python\Python311\Lib\tarfile.py", line 2448, in makefile
with bltn_open(targetpath, "wb") as target:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'dbt_packages\\dbt-data-reliability-0.13.0\\integration_tests\\deprecated_tests\\macros\\unit_tests\\test_adapter_specific_macros_have_default_implementation.sql'Ryan Shadle
12/04/2023, 7:26 PMNoa Kurman
12/05/2023, 8:57 AMRyan Shadle
12/05/2023, 2:54 PMNoa Kurman
12/06/2023, 11:49 AMedr on installation. When edr is being installed it’s also installing the internal dbt project, and it may be that it did not have enough permissions to do that. Can you maybe add permissions to the folder where it’s being installed and also check for errors during the installation?
Another possible issue is your python path. Is your env running on python virtualenv? Can you check your PATH and see all the python locations are directed correctly ?Ryan Shadle
12/06/2023, 11:28 PMOfek Weiss
01/07/2024, 4:08 PMvenv for edr and retrying?Paulo Henrique Orind
01/12/2024, 9:50 AMDaniel Halabe
03/06/2024, 2:36 AMvirtualenv from any directory because it's a global Python tool. Open PowerShell as an administrator and run:
pip install virtualenv
Step 2: Create a Virtual Environment
First, navigate to your dbt project directory. If you don't already have a specific directory for your dbt project, you should create one and navigate into it. This directory will be the "home" for your dbt project files and the virtual environment.
cd path\to\your\dbt\project
Replace path\to\your\dbt\project with the actual path to your dbt project directory. If this is a new project and you're not sure where to place it, you can create a new directory anywhere you usually store projects.
Once you're in your project directory (or have created a new one and navigated into it), create the virtual environment within this directory:
virtualenv venv
This command creates a new folder named venv in your current directory (your dbt project directory), which contains the virtual environment.
By following this approach, your virtual environment is neatly contained within your project directory, making it easier to manage your project's dependencies separately from the global Python environment.
To use this virtual environment, ensure you activate it whenever you're working on your dbt project. To activate the virtual environment, navigate to your dbt project directory in PowerShell, and run:
.\venv\Scripts\Activate.ps1
After activation, you should see (venv) prefixed to your PowerShell prompt, indicating that the virtual environment is active. Now, any Python or dbt commands you run will use the versions of Python and dbt installed in your virtual environment, not the global versions installed on your system.
Install dbt-core: This is the core dbt library that provides the dbt functionality. You need to install it even if you have it installed globally because the virtual environment is isolated from global installations.
pip install dbt-core
Install the dbt adapter for your data warehouse: Since you mentioned Snowflake, you would install dbt-snowflake. If you're using a different data warehouse, you would install the corresponding adapter (e.g., dbt-bigquery, dbt-postgres, etc.).
pip install dbt-snowflake
Install elementary: Finally, install the elementary package.
shell
pip install elementary-data
After I ran each of these steps the edr report command worked! Sshot below.
It's worth mentioning I followed all of the quickstart steps first for the CLI listed in the documentation and only ran these steps AFTER I started getting the same error message above. Also I'm running on a windows system, some of these steps are different on OS. If you run into any trouble copy paste this into your favorite LLM(ChatGPT) and tweak as needed.