# CalledProcessError when running dbt in Databricks

**URL:** <https://discourse.getdbt.com/t/calledprocesserror-when-running-dbt-in-databricks/18566>\
**Category:** Help\
**Tags:** databricks\
**Created:** [March 10, 2025, 3:26pm UTC](https://discourse.getdbt.com/t/calledprocesserror-when-running-dbt-in-databricks/18566 "2025-03-10T15:26:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mausch](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mausch](https://discourse.getdbt.com/u/mausch)\
**Post date:** [March 10, 2025, 3:26pm UTC](https://discourse.getdbt.com/t/calledprocesserror-when-running-dbt-in-databricks/18566/1 "2025-03-10T15:26:31Z")

</div>

## The problem I’m having

Whenever I try to run my dbt project (sourced in Azure DevOps) in Databricks Workflows, I get an error saying some files from the repo cannot be copied to Databricks. What can I do about it? Am I missing something?

## The context of why I’m trying to do this

I’d like to have this dbt build automatically scheduled in Databricks.

## Error message

```auto
CalledProcessError: Command 'b'\nmkdir -p "/tmp/tmp-dbt-run-1124228490001263"\nunexpected_errors="$(cp -a -u "/Workspace/Repos/.internal/085c4ffe5e_commits/16113d05ffd8cd7b148ed973080aa51439e98b0c/." "/tmp/tmp-dbt-run-1124228490001263" 2> >(grep -v \'Operation not supported\'))"\nif [[-n "$unexpected_errors"]]; then\n >&2 echo -e "Unexpected error(s) encountered while copying:\n$unexpected_errors"\n exit 1\nfi\n returned non-zero exit status 1.

Unexpected error(s) encountered while copying:
cp: cannot stat '/Workspace/Repos/.internal/085c4ffe5e_commits/16113d05ffd8cd7b148ed973080aa51439e98b0c/./venv/share/doc/networkx-3.1/examples/3d_drawing/ __pycache__': No such file or directory
cp: cannot stat '/Workspace/Repos/.internal/085c4ffe5e_commits/16113d05ffd8cd7b148ed973080aa51439e98b0c/./venv/share/doc/networkx-3.1/examples/algorithms/ __pycache__': No such file or directory
cp: cannot stat '/Workspace/Repos/.internal/085c4ffe5e_commits/16113d05ffd8cd7b148ed973080aa51439e98b0c/./venv/share/doc/networkx-3.1/examples/basic/ __pycache__': No such file or directory
cp: cannot stat '/Workspace/Repos/.internal/085c4ffe5e_commits/16113d05ffd8cd7b148ed973080aa51439e98b0c/./venv/share/doc/networkx-3.1/examples/drawing/ __pycache__': No such file or directory
cp: cannot stat '/Workspace/Repos/.internal/085c4ffe5e_commits/16113d05ffd8cd7b148ed973080aa51439e98b0c/./venv/share/doc/networkx-3.1/examples/graph/ __pycache__': No such file or directory
cp: cannot stat '/Workspace/Repos/.internal/085c4ffe5e_commits/16113d05ffd8cd7b148ed973080aa51439e98b0c/./venv/share/doc/networkx-3.1/examples/subclass/ __pycache__': No such file or directory

```

---

<div class="post-metadata">

**Author:** ![pablote16](https://avatars.discourse-cdn.com/v4/letter/p/7cd45c/32.png) [@pablote16](https://discourse.getdbt.com/u/pablote16)\
**Post date:** [June 12, 2025, 6:13am UTC](https://discourse.getdbt.com/t/calledprocesserror-when-running-dbt-in-databricks/18566/2 "2025-06-12T06:13:18Z")

</div>

Hi, same issue here running dbt in Databricks. It was working fine and then started showing the same error. Did you find any solution to this? Thanks

---

<div class="post-metadata">

**Author:** ![mausch](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mausch](https://discourse.getdbt.com/u/mausch)\
**Post date:** [June 12, 2025, 11:35am UTC](https://discourse.getdbt.com/t/calledprocesserror-when-running-dbt-in-databricks/18566/3 "2025-06-12T11:35:05Z")

</div>

I moved the venv folder from the git repository and wrote venv in .gitignore.
