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

[fix] missing indentation level in profile example #4208

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

kevinlacire
Copy link
Contributor

Current example copy/paste as is causes the following exception :

12:32:47  Encountered an error:
argument of type 'NoneType' is not iterable
12:32:47  Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/dbt/main.py", line 136, in main
    results, succeeded = handle_and_check(args)
  File "/usr/local/lib/python3.10/site-packages/dbt/main.py", line 206, in handle_and_check
    task, res = run_from_args(parsed)
  File "/usr/local/lib/python3.10/site-packages/dbt/main.py", line 233, in run_from_args
    task = parsed.cls.from_args(args=parsed)
  File "/usr/local/lib/python3.10/site-packages/dbt/task/base.py", line 163, in from_args
    return super().from_args(args)
  File "/usr/local/lib/python3.10/site-packages/dbt/task/base.py", line 98, in from_args
    config = cls.ConfigType.from_args(args)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/runtime.py", line 263, in from_args
    project, profile = cls.collect_parts(args)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/runtime.py", line 207, in collect_parts
    profile = cls.collect_profile(args=args)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/runtime.py", line 229, in collect_profile
    profile = cls._get_rendered_profile(args, profile_renderer, profile_name)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/runtime.py", line 200, in _get_rendered_profile
    return Profile.render_from_args(args, profile_renderer, profile_name)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/profile.py", line 428, in render_from_args
    return cls.from_raw_profiles(
  File "/usr/local/lib/python3.10/site-packages/dbt/config/profile.py", line 394, in from_raw_profiles
    return cls.from_raw_profile_info(
  File "/usr/local/lib/python3.10/site-packages/dbt/config/profile.py", line 338, in from_raw_profile_info
    target_name, profile_data = cls.render_profile(
  File "/usr/local/lib/python3.10/site-packages/dbt/config/profile.py", line 298, in render_profile
    raw_profile_data = cls._get_profile_data(raw_profile, profile_name, target_name)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/profile.py", line 215, in _get_profile_data
    if target_name not in outputs:
TypeError: argument of type 'NoneType' is not iterable

What are you changing in this pull request and why?

Checklist

  • Review the Content style guide and About versioning so my content adheres to these guidelines.
  • Add a checklist item for anything that needs to happen before this PR is merged, such as "needs technical review" or "change base branch."

Adding new pages (delete if not applicable):

  • Add page to website/sidebars.js
  • Provide a unique filename for the new page

Removing or renaming existing pages (delete if not applicable):

  • Remove page from website/sidebars.js
  • Add an entry website/static/_redirects
  • Ran link testing to update the links that point to the deleted page

Current example copy/paste as is causes the following exception :

```bash
12:32:47  Encountered an error:
argument of type 'NoneType' is not iterable
12:32:47  Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/dbt/main.py", line 136, in main
    results, succeeded = handle_and_check(args)
  File "/usr/local/lib/python3.10/site-packages/dbt/main.py", line 206, in handle_and_check
    task, res = run_from_args(parsed)
  File "/usr/local/lib/python3.10/site-packages/dbt/main.py", line 233, in run_from_args
    task = parsed.cls.from_args(args=parsed)
  File "/usr/local/lib/python3.10/site-packages/dbt/task/base.py", line 163, in from_args
    return super().from_args(args)
  File "/usr/local/lib/python3.10/site-packages/dbt/task/base.py", line 98, in from_args
    config = cls.ConfigType.from_args(args)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/runtime.py", line 263, in from_args
    project, profile = cls.collect_parts(args)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/runtime.py", line 207, in collect_parts
    profile = cls.collect_profile(args=args)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/runtime.py", line 229, in collect_profile
    profile = cls._get_rendered_profile(args, profile_renderer, profile_name)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/runtime.py", line 200, in _get_rendered_profile
    return Profile.render_from_args(args, profile_renderer, profile_name)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/profile.py", line 428, in render_from_args
    return cls.from_raw_profiles(
  File "/usr/local/lib/python3.10/site-packages/dbt/config/profile.py", line 394, in from_raw_profiles
    return cls.from_raw_profile_info(
  File "/usr/local/lib/python3.10/site-packages/dbt/config/profile.py", line 338, in from_raw_profile_info
    target_name, profile_data = cls.render_profile(
  File "/usr/local/lib/python3.10/site-packages/dbt/config/profile.py", line 298, in render_profile
    raw_profile_data = cls._get_profile_data(raw_profile, profile_name, target_name)
  File "/usr/local/lib/python3.10/site-packages/dbt/config/profile.py", line 215, in _get_profile_data
    if target_name not in outputs:
TypeError: argument of type 'NoneType' is not iterable
```
@kevinlacire kevinlacire requested a review from a team as a code owner October 6, 2023 12:40
@welcome
Copy link

welcome bot commented Oct 6, 2023

Hello!👋 Thanks for contributing to the dbt product documentation and opening this pull request! ✨
We use Markdown and some HTML to write the dbt product documentation. When writing content, you can use our style guide and content types to understand our writing standards and how we organize information in the dbt product docs.
We'll review your contribution and respond as soon as we can. 😄

@vercel
Copy link

vercel bot commented Oct 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2023 0:14am

@github-actions github-actions bot added the content Improvements or additions to content label Oct 6, 2023
@runleonarun runleonarun added the new contributor Label for first-time contributors label Oct 6, 2023
@github-actions github-actions bot added the size: small This change will take 1 to 2 days to address label Oct 6, 2023
@runleonarun
Copy link
Collaborator

Great catch @kevinlacire! Approving and merging once all the tests pass.

Copy link
Collaborator

@runleonarun runleonarun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This nesting looks correct now

@runleonarun runleonarun merged commit 073804e into dbt-labs:current Oct 10, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content new contributor Label for first-time contributors size: small This change will take 1 to 2 days to address
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants