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

SyntaxError being raised on pulumi_newrelic/provider.py #11734

Closed
dmelo opened this issue Dec 21, 2022 · 1 comment
Closed

SyntaxError being raised on pulumi_newrelic/provider.py #11734

dmelo opened this issue Dec 21, 2022 · 1 comment
Assignees
Labels
area/codegen SDK-gen, program-gen, convert kind/bug Some behavior is incorrect or out of spec language/python resolution/duplicate This issue is a duplicate of another issue

Comments

@dmelo
Copy link

dmelo commented Dec 21, 2022

What happened?

I have added this provider to my python project, but when I try to use it, I get an error on its initialization.

Steps to reproduce

Add the provider to the project, following the documentation. Import AwsLinkAccount:

from pulumi_newrelic.cloud.aws_link_account import AwsLinkAccount

Expected Behavior

I expected to be able to use the AwsLinkAccount.

Actual Behavior

the following stacktrace was produced:

    error: Program failed with an unhandled exception:
    Traceback (most recent call last):
      File "/home/dmelo/proj3/fc/fc-infra/./__main__.py", line 3, in <module>
        from infra import Infra
      File "/home/dmelo/proj3/fc/fc-infra/./infra/__init__.py", line 43, in <module>
        from infra.new_relic import NewRelic
      File "/home/dmelo/proj3/fc/fc-infra/./infra/new_relic.py", line 11, in <module>
        from pulumi_newrelic.cloud.aws_link_account import AwsLinkAccount
      File "/home/dmelo/proj3/fc/fc-infra/.venv/lib64/python3.10/site-packages/pulumi_newrelic/__init__.py", line 34, in <module>
        from .provider import *
      File "/home/dmelo/proj3/fc/fc-infra/.venv/lib64/python3.10/site-packages/pulumi_newrelic/provider.py", line 278
        __props__.__dict__["account_id"] = None if pulumi.Output.from_input(account_id).apply(pulumi.runtime.to_json) if account_id is not None else None is None else pulumi.Output.secret(pulumi.Output.from_input(account_id).apply(pulumi.runtime.to_json) if account_id is not None else None)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    SyntaxError: expected 'else' after 'if' expression

Output of pulumi about

CLI          
Version      3.50.0
Go Version   go1.19.4
Go Compiler  gc

Plugins
NAME      VERSION
auth0     2.14.0
aws       5.24.0
awsx      1.0.0-beta.11
docker    3.6.1
github    5.1.0
newrelic  5.2.0
python    unknown
random    4.8.2

Host     
OS       fedora
Version  36
Arch     x86_64

This project is written in python: executable='/home/dmelo/proj3/fc/fc-infra/.venv/bin/python3' version='3.10.8

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@dmelo dmelo added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Dec 21, 2022
@mikhailshilkov mikhailshilkov removed the needs-triage Needs attention from the triage team label Dec 26, 2022
@mikhailshilkov mikhailshilkov transferred this issue from pulumi/pulumi-newrelic Dec 26, 2022
@mikhailshilkov mikhailshilkov added language/python area/codegen SDK-gen, program-gen, convert labels Dec 26, 2022
@justinvp justinvp self-assigned this Jan 24, 2023
@justinvp justinvp added the resolution/duplicate This issue is a duplicate of another issue label Jan 26, 2023
@justinvp
Copy link
Member

This is a dupe of #11278 which was fixed in #11494. The New Relic provider was just updated to make use of the fixed Python SDK codegen in pulumi/pulumi-newrelic#365, so this should be fixed in the next release of the New Relic provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen SDK-gen, program-gen, convert kind/bug Some behavior is incorrect or out of spec language/python resolution/duplicate This issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants