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

[get_object_bucket] AttributeError: type object 'InvokeOptions' has no attribute 'merge' #206

Open
idrissneumann opened this issue Mar 4, 2023 · 1 comment

Comments

@idrissneumann
Copy link

Hi.

We recently upgraded from 0.1.8 to 1.7.0 and implement a "refresh" function (to help reimporting the state of existing buckets).

We got this errors:

error: an unhandled error occurred: python inline source runtime error: type object 'InvokeOptions' has no attribute 'merge'
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pulumi/automation/_server.py", line 69, in Run
    loop.run_until_complete(run_in_stack(self.program))
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.9/site-packages/pulumi/runtime/stack.py", line 126, in run_in_stack
    await run_pulumi_func(lambda: Stack(func))
  File "/usr/local/lib/python3.9/site-packages/pulumi/runtime/stack.py", line 49, in run_pulumi_func
    func()
  File "/usr/local/lib/python3.9/site-packages/pulumi/runtime/stack.py", line 126, in <lambda>
    await run_pulumi_func(lambda: Stack(func))
  File "/usr/local/lib/python3.9/site-packages/pulumi/runtime/stack.py", line 149, in __init__
    func()
  File "/app/src/strategies/ScalewayStrategy.py", line 128, in create_pulumi_program
    existing_bucket = scaleway.get_object_bucket(name=hashed_bucket_name)
  File "/usr/local/lib/python3.9/site-packages/lbrlabs_pulumi_scaleway/get_object_bucket.py", line 189, in get_object_bucket
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
AttributeError: type object 'InvokeOptions' has no attribute 'merge'

Here's our code to reproduce this issue:

 def create_pulumi_program():
    existing_bucket = scaleway.get_object_bucket(name=bucket_name)
    pulumi.export("type", existing_bucket.type)

stack = auto.create_or_select_stack(stack_name=bucket_name, project_name=bucket_name, program=create_pulumi_program)

I think it's not related to the upgrade since we upgraded in order to be able to call the get_object_bucket which seems not exists in the older version.

Thanks for your help.

@dirien
Copy link
Collaborator

dirien commented Jun 19, 2023

Hey @idrissneumann,

can you try the latest version 1.9.0 please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants