https://pulumi.com logo
#python
Title
# python
h

hundreds-gpu-71155

02/29/2024, 5:55 PM
so, i'm just tossing this out to the pulumi devs, got a singularly unhelpful error. I plan on just commenting things out until it goes away, but I figured i'd drop it here so you know what's up
Copy code
error: Program failed with an unhandled exception:
    Traceback (most recent call last):
      File "/opt/homebrew/bin/pulumi-language-python-exec", line 191, in <module>
        loop.run_until_complete(coro)
      File "/Users/jamie/.pyenv/versions/3.12.1/lib/python3.12/asyncio/base_events.py", line 684, in run_until_complete
        return future.result()
               ^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 141, in run_in_stack
        await run_pulumi_func(run)
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 51, in run_pulumi_func
        await wait_for_rpcs()
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 83, in wait_for_rpcs
        raise exn from cause
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/runtime/rpc_manager.py", line 71, in rpc_wrapper
        result = await rpc
                 ^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/runtime/resource.py", line 1067, in do_register_resource_outputs
        serialized_props = await rpc.serialize_properties(outputs or {}, {})
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/runtime/rpc.py", line 215, in serialize_properties
        result = await serialize_property(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/runtime/rpc.py", line 468, in serialize_property
        value = await serialize_property(
                ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/runtime/rpc.py", line 451, in serialize_property
        future_return = await asyncio.ensure_future(awaitable)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/output.py", line 129, in get_value
        val = await self._future
              ^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/output.py", line 785, in fut
        v2 = await o2.future()
             ^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/output.py", line 129, in get_value
        val = await self._future
              ^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/output.py", line 476, in gather_futures
        return await _gather_from_dict(value_futures_dict)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/output.py", line 886, in _gather_from_dict
        results = await asyncio.gather(*tasks.values())
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/output.py", line 129, in get_value
        val = await self._future
              ^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/output.py", line 175, in run
        value = await self._future
                ^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/output.py", line 175, in run
        value = await self._future
                ^^^^^^^^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/output.py", line 200, in run
        transformed: Input[U] = func(value)
                                ^^^^^^^^^^^
      File "/Users/jamie/.local/share/virtualenvs/blount-z19IO5O9/lib/python3.12/site-packages/pulumi/output.py", line 250, in lift
        return UNKNOWN if isinstance(v, Unknown) else getattr(v, item)
                                                      ^^^^^^^^^^^^^^^^
    AttributeError: 'str' object has no attribute 'result'
this really needs more context to be helpful
i think i've narrowed it down to
pulumi.Output.format()
ok, so i figured it out, I was calling
pulumi_azure.cosmosdb.PostgresqlRole.password
with
.result.apply()
instead of
.apply()
, probably because of refactoring from `pulumi_random.RandomPassword()`'s
.result