```custom_data=base64.b64encode("hahaha".encode("u...
# python
j
Copy code
custom_data=base64.b64encode("hahaha".encode("utf-8"))
f
@jolly-camera-35709 What's the error message you're getting ?
j
Hi @faint-whale-59078 thanks for your response, this is error:
error: Program failed with an unhandled exception:   error: Traceback (most recent call last):    File "/root/.pulumi/bin/pulumi-language-python-exec", line 85, in <module>     loop.run_until_complete(coro)    File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete     return future.result()    File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step     result = coro.send(None)    File "/usr/local/lib/python3.6/dist-packages/pulumi/runtime/stack.py", line 83, in run_in_stack     await run_pulumi_func(lambda: Stack(func))    File "/usr/local/lib/python3.6/dist-packages/pulumi/runtime/stack.py", line 51, in run_pulumi_func     await RPC_MANAGER.rpcs.pop()    File "/usr/local/lib/python3.6/dist-packages/pulumi/runtime/rpc_manager.py", line 67, in rpc_wrapper     result = await rpc    File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup     future.result()    File "/usr/lib/python3.6/asyncio/tasks.py", line 182, in _step     result = coro.throw(exc)    File "/usr/local/lib/python3.6/dist-packages/pulumi/output.py", line 88, in is_value_known     return await is_known and not contains_unknowns(await future)    File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup     future.result()    File "/usr/lib/python3.6/asyncio/tasks.py", line 182, in _step     result = coro.throw(exc)    File "/usr/local/lib/python3.6/dist-packages/pulumi/output.py", line 88, in is_value_known     return await is_known and not contains_unknowns(await future)    File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup     future.result()    File "/usr/lib/python3.6/asyncio/tasks.py", line 182, in _step     result = coro.throw(exc)    File "/usr/local/lib/python3.6/dist-packages/pulumi/output.py", line 88, in is_value_known     return await is_known and not contains_unknowns(await future)    File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup     future.result()    File "/usr/lib/python3.6/asyncio/tasks.py", line 182, in _step
this is part of the error, and the error just repeated for many lines, it doesn't make any sense to me...
f
A few questions if you don't mind... 1 - Is there a specific reason you're using asyncio? 2 - Could it be possible for you to add as an attachment the entire errors please? Please include everything even if you feel it's repeating. Reading the output above and it feels some lines are missing.
Other than the points above, I used your code in a test deployment I have an it worked just fine. I think as long as you have
import base64
at the top of your file, the line you mentioned shouldn't create any problem.
j
Hi @faint-whale-59078, please check the attachment, it's the entire error, yes, I did import base64
uh...what is asyncio?
f
asyncio is a python library to do asynchronous work. "asyncio is used as a foundation for multiple Python asynchronous frameworks that provide high-performance network and web-servers, database connection libraries, distributed task queues, etc." This is something that your python code or your environment is loading. Mostlikely via
import asyncio
.
But, this may not be related to the error...
Question: Are you running the latest version of the pulumi python module? Mine is 2.15.6.
you should be able to find the version installed in
/usr/local/lib/python3.6/dist-packages/pulumi/
.
And you can find all the versions published by pulumi at https://pypi.org/project/pulumi/#history
Also, since when have you had this issue? Have you introduced any recent changes in your code? Have you tried to revert back and if so, do you get the same error?
j
I didn't have this line "import asyncio" in my code
how did you get the version from /usr/local/lib/python3.6/dist-packages/pulumi/, I found this folder but didn't figure out how to check version from there, I hope it's the latest version coz pulumi is on latest version
I had this issue since I added this line of "custom_data", when I removed this line, all is good