Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbt deps fails for non english shells #1222

Closed
vijaykiran opened this issue Jan 8, 2019 · 1 comment
Closed

dbt deps fails for non english shells #1222

vijaykiran opened this issue Jan 8, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@vijaykiran
Copy link
Contributor

Please make sure to fill out either the issue template or the feature template and delete the other one!

Issue

Running dbt deps fails on machines with Locale set to any language other than English

Issue description

The command was (to check Spanish Locale) LC_ALL=es_ES dbt deps in a project with packages.yml referring to dbt-utils

Results

Runs fine with en_US, but failed for Spanish.

System information

The output of dbt --version:

₹ dbt --version
installed version: 0.12.1
   latest version: 0.12.1

Up to date!

The operating system you're running on: Mac OS Mojave

The python version you're using (probably the output of python --version): Python 3.6.5

Steps to reproduce

Any dbt projects with a one dependency in projects.yml. Here is the output:

analytics-core git:(master) 1M 2A ₹ LC_ALL=es_ES dbt deps
Encountered an error:
'NoneType' object has no attribute 'group'
Traceback (most recent call last):
  File "/Users/vijay/.pyenv/versions/3.6.5/lib/python3.6/site-packages/dbt/main.py", line 76, in main
    results, succeeded = handle_and_check(args)
  File "/Users/vijay/.pyenv/versions/3.6.5/lib/python3.6/site-packages/dbt/main.py", line 126, in handle_and_check
    task, res = run_from_args(parsed)
  File "/Users/vijay/.pyenv/versions/3.6.5/lib/python3.6/site-packages/dbt/main.py", line 181, in run_from_args
    results = run_from_task(task, cfg, parsed)
  File "/Users/vijay/.pyenv/versions/3.6.5/lib/python3.6/site-packages/dbt/main.py", line 189, in run_from_task
    result = task.run()
  File "/Users/vijay/.pyenv/versions/3.6.5/lib/python3.6/site-packages/dbt/task/deps.py", line 439, in run
    target_config = final_deps[name].fetch_metadata(self.config)
  File "/Users/vijay/.pyenv/versions/3.6.5/lib/python3.6/site-packages/dbt/task/deps.py", line 83, in fetch_metadata
    self._cached_metadata = self._fetch_metadata(project)
  File "/Users/vijay/.pyenv/versions/3.6.5/lib/python3.6/site-packages/dbt/task/deps.py", line 239, in _fetch_metadata
    path = self._checkout(project)
  File "/Users/vijay/.pyenv/versions/3.6.5/lib/python3.6/site-packages/dbt/task/deps.py", line 235, in _checkout
    dirname=self._checkout_name)
  File "/Users/vijay/.pyenv/versions/3.6.5/lib/python3.6/site-packages/dbt/clients/git.py", line 77, in clone_and_checkout
    directory = matches.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
@vijaykiran
Copy link
Contributor Author

Looks like this is occurring because the code is relying on git command out and err to be in English https://github.com/fishtown-analytics/dbt/blob/dev/stephen-girard/core/dbt/clients/git.py#L75

@drewbanin drewbanin added the bug Something isn't working label Jan 8, 2019
@cmcarthur cmcarthur added this to the Stephen Girard milestone Jan 23, 2019
beckjake added a commit that referenced this issue Jan 28, 2019
…-langauges

Fix dbt deps on non-english shells (#1222)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants