Reputation: 41
I last used dbt several months ago. Returning to it, I had to update from version 0.21.1 to 1.1.0 to match my team's project. I've run dbt clean, then dbt deps always returns this error: The process cannot access the file because it is being used by another process: 'dbt_packages\dbt-expectations-0.5.1\integration_tests'
I see two packages after it errors: dbt_expectations & dbt-expectations-0.5.1 - I'm not sure what the latter package is about since it doesn't exist on my teammates machines.
These are all my packages which match my teammates:
There's nothing else using the mentioned file before executing dbt deps & I've restarted to ensure there wasn't anything hung up. I don't see anything helpful in the logs:
14:28:05.062468 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'package', 'label': '5cc0ad0f-792a-49a6-8a66-f59ff8c3e642', 'property_': 'install', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002CDFB6D1EB0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002CDFB6D14C0>]} 14:28:05.063465 [info ] [MainThread]: Installing calogica/dbt_expectations 14:28:06.961306 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002CDFB689550>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002CDFB6D14C0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x000002CDFB702EE0>]}
============================== 2022-05-23 14:28:10.424049 | 2a7e240e-1707-4551-8966-58797e038d3a ============================== 14:28:10.424049 [info ] [MainThread]: Running with dbt=1.1.0 14:28:10.425046 [debug] [MainThread]: running dbt with arguments {'write_json': True, 'use_colors': True, 'printer_width': 80, 'version_check': True, 'partial_parse': True, 'static_parser': True, 'profiles_dir': 'C:\Users\jasonmckenzie\.dbt', 'send_anonymous_usage_stats': True, 'event_buffer_size': 100000, 'quiet': False, 'no_print': False, 'resource_types': [], 'output': 'selector', 'indirect_selection': 'eager', 'which': 'list'} 14:28:10.425046 [debug] [MainThread]: Tracking: tracking 14:28:10.435018 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000254727F3D90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000254727F32E0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000254727F37C0>]} 14:28:10.462945 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000254727D1820>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000254727D1490>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000254727D19D0>]}
============================== 2022-05-23 14:28:10.825973 | 8d0ab879-6b59-4473-845a-cde9dd23352b ============================== 14:28:10.825973 [info ] [MainThread]: Running with dbt=1.1.0 14:28:10.826970 [debug] [MainThread]: running dbt with arguments {'write_json': True, 'use_colors': True, 'printer_width': 80, 'version_check': True, 'partial_parse': True, 'static_parser': True, 'profiles_dir': 'C:\Users\jasonmckenzie\.dbt', 'send_anonymous_usage_stats': True, 'event_buffer_size': 100000, 'quiet': False, 'no_print': False, 'resource_types': [], 'output': 'selector', 'indirect_selection': 'eager', 'which': 'list'} 14:28:10.826970 [debug] [MainThread]: Tracking: tracking 14:28:10.835946 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000170D052F100>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000170D052FEB0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000170D052FC40>]} 14:28:10.892797 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000170D04EC640>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000170D04ECD90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x00000170D04EC4F0>]}
Upvotes: 4
Views: 4154
Reputation: 316
I was also getting same error
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process
packages\\dbt_utils
So i disabled
"Power User for dbt Core™
" extension(you can unistall for the time bieng as well) and then it went like a charm (See below)
Upvotes: 1
Reputation: 13710
In my case and looks like for most of the users, it seems a case of VS Code extensions such as dbt-power-user
which interferes with the installation of dbt deps
.
A quick workaround is to not use the vscode integrated terminal but close vscode completely and use a standalone terminal just for
dbt deps
Upvotes: 4
Reputation: 21
I got this error when trying to install tsql_utils. I 'fixed' it by adding quote marks around the versions.
packages:
- package: dbt-labs/dbt_utils
version: "0.9.2"
- package: dbt-msft/tsql_utils
version: "0.8.1"
Initially, I had no quotes around them.
Upvotes: 2