Getting this error from python `pulumi_kubernetes`...
# python
b
Getting this error from python
pulumi_kubernetes
module seems like it’s not seeing the core module. Pylint isn’t balking at it so not sure what’s going on. Any ideas?
Here is some more details on the
pulumi-kubernetes
module Name: pulumi-kubernetes Version: 0.21.1 Summary: A Pulumi package for creating and managing Kubernetes resources. Home-page: https://pulumi.io Author: UNKNOWN Author-email: UNKNOWN License: Apache-2.0 Location: /Users/angel/.pyenv/versions/3.7.2/lib/python3.7/site-packages Requires: pulumi Required-by:
g
I don’t see anything obvious from the info you posted. This just worked for me:
Copy code
import pulumi_kubernetes
namespace = pulumi_kubernetes.core.v1.Namespace("foo")
b
@gorgeous-egg-16927 thx for the response
@gorgeous-egg-16927 what version of pulumi_kubernetes are you using? Could it be a version incompatibility?
g
That was also on 0.21.1.
b
hmmm not sure what’s going on here then
g
I’d guess something to do with your python env, but i’m much less familiar with the python sdk. @incalculable-sundown-82514 might be able to help troubleshoot
i
I actually think that this is a Python thing. Here’s a write-up I made about this particular issue: https://github.com/pulumi/pulumi-terraform/pull/356
The upshot for your code is that you can do
from pulumi_kubernetes.core.v1 import Namespace
to import specific classes.
However I do think that it would be useful to make the syntax that you did work - I’m working on that.
b
great
I’ll try your work around
int he meantime
i
great!
b
I used your work around & it got me past the
core
module not found issue but now I’m experiencing a new issue
I’ll post out of thread
thx