Module Import Error with Google Cloud Secrets Manager

Hi all,

I’m using the google.cloud.secretmanager module in my app and I’m getting an import error after deploying:
ModuleNotFoundError: No module named 'google.cloud.secretmanager'

I’m not sure why because it works on my local machine and the relevant package is in my requirements.txt (protobuf==3.19.1). The only thing I can think is the Python version is stopping it. On my machine I’m running 3.9 but on Streamlit Teams the app is running 3.7, but not sure why that would stop it.

Please help!

Solved.

Specifying protobuf in my requirements.txt wasn’t enough. I had to explicitly put google-cloud-secret-manager==2.7.2 in there and it worked fine.

2 Likes