<@U08NYTRFFJ5> Hi everyone, I'm facing an issue ...
# ask-elementary-ai
n
@Owen Agitza Jaya Hi everyone, I'm facing an issue with
edr report
command. I'm running this locally on Windows 10 with postgres. [Possibly related to Link] The elementary schema is up and running, I just can't generate the report. The details of the error is attached in the thread comment.
Copy code
$ python -V
Python 3.12.9


$ pip list
dbt-core                  1.7.0
dbt-postgres              1.7.0
elementary-data           0.18.1
dbt project structure
Copy code
dbt_project_folder
	- venv
	- models
	- seeds
	...
	- dbt_project.yml
	- profiles.yml
Copy code
________                          __
   / ____/ /__  ____ ___  ___  ____  / /_____ ________  __
  / __/ / / _ \/ __ `__ \/ _ \/ __ \/ __/ __ `/ ___/ / / /
 / /___/ /  __/ / / / / /  __/ / / / /_/ /_/ / /  / /_/ /
/_____/_/\___/_/ /_/ /_/\___/_/ /_/\__/\__,_/_/   \__, /
                                                 /____/


Any feedback and suggestions are welcomed! join our community here - <https://bit.ly/slack-elementary>

2025-04-21 14:24:03 — INFO — Running with edr=0.18.1
2025-04-21 14:24:03 — INFO — Installing packages for edr internal dbt package...
2025-04-21 14:24:03 — INFO — Running dbt command --log-format json deps --project-dir E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\monitor\dbt_project
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Scripts\edr.exe\__main__.py", line 7, in <module>
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\click\core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\click\core.py", line 1082, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\cli\cli.py", line 73, in invoke
    return super().invoke(ctx)
           ^^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\click\core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\click\core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\click\core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\click\decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\monitor\cli.py", line 450, in report
    data_monitoring = DataMonitoringReport(
                      ^^^^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\monitor\data_monitoring\report\data_monitoring_report.py", line 41, in __init__
    super().__init__(
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\monitor\data_monitoring\data_monitoring.py", line 35, in __init__
    self.internal_dbt_runner = self._init_internal_dbt_runner()
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\monitor\data_monitoring\data_monitoring.py", line 61, in _init_internal_dbt_runner
    internal_dbt_runner = create_dbt_runner(
                          ^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\clients\dbt\factory.py", line 37, in create_dbt_runner
    return RUNNER_CLASS(
           ^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\clients\dbt\command_line_dbt_runner.py", line 57, in __init__
    self._run_deps_if_needed()
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\clients\dbt\command_line_dbt_runner.py", line 320, in _run_deps_if_needed
    self.deps()
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\clients\dbt\command_line_dbt_runner.py", line 133, in deps
    result = self._run_command(
             ^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\clients\dbt\command_line_dbt_runner.py", line 114, in _run_command
    result = self._inner_run_command(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Broom\Local Repo\broom-data-dbt\broom-venv\Lib\site-packages\elementary\clients\dbt\api_dbt_runner.py", line 54, in _inner_run_command
    raise DbtCommandError(
elementary.exceptions.exceptions.DbtCommandError: Failed to run dbt command.
maximum recursion depth exceeded
k
A message from kapa.ai
I can see you're encountering an error when trying to run the
edr report
command with Elementary Data. This is a common issue that several users have faced, particularly on Windows environments. Based on the error message, it appears you're hitting a recursion depth issue when Elementary tries to run the internal dbt commands needed to generate the report. This is similar to issues reported by other users in the Elementary community. Here are some troubleshooting steps you can try: 1. Check your profiles.yml configuration: Make sure your Elementary profile is correctly configured in your profiles.yml file. The schema defined in your dbt_project.yml should match the schema in your Elementary profile. 2. Run Elementary models first: Before generating the report, ensure you've run:
Copy code
dbt deps    dbt run -s elementary --full-refresh
3. Try specifying profiles and project directories: When running the edr command, explicitly specify the paths:
Copy code
edr report --project-dir "path/to/your/dbt/project" --profiles-dir "path/to/your/profiles.yml"
4. Path length issues on Windows: Windows often has issues with long paths. Try moving your project to a shorter path location (like
C:\project_name
) as suggested in community discussions [in this thread](https://slack.com/archives/C02CTC89LAX/p1715603904239619). 5. Try running in a Linux environment: Some users have resolved similar issues by switching to a Linux environment (via Docker or WSL) as mentioned [in this discussion](https://slack.com/archives/C02CTC89LAX/p1715603904239619). 6. Check version compatibility: Ensure your Elementary dbt package version matches your edr CLI version. You can check your dbt package version in your packages.yml file. 7. Check for SIGTERM/SIGKILL signals: Your error shows a recursion depth issue, which might be related to memory constraints causing the process to be killed. If you continue to face issues, providing more details about your specific setup (like your profiles.yml configuration with sensitive information removed) might help in diagnosing the problem further. I hope this helps you resolve the issue!
n
@Owen Agitza Jaya I saw that other users solved this by correcting the profiles configuration, so would start with this solution 🙂 Let me know if Elementary AI's response is helpful!
o
Hi @Noya Offer I actually solved this last week by following the thread the AI mentioned [Link], so it was very helpful. The thread didn’t provide a clear solution but it pointed me to the right direction. Something’s wrong with Elementary’s
--project-dir
command as it doesn’t look at the right directory no matter what input it receives. I solved the problem by: 1) Moving the venv outside the dbt project directory 2) And specifying the
--profiles-dir
to my dbt project directory
n
Awesome! We'll dig into the issue with this command. Thanks for the feedback 🙂