Lesson 5: Text Generation with Vertex AI

In lesson 5, I have not changed any source code, but the error happened in the picture when executing source code. Any one can help? Thanks

Hi @Yiyi

Welcome to the community.

What module are you running right now?

Hi elirod,

I just run the source code in lesson 5 ‘Question Answering’ module.

I too have run into the same issue.

Hi guys.

The print doesn’t show the error. Could you send again?


Here’s the import, prompt and error.

Thank you for the update.

I did a couple tests and work just fine for me.

One question: are you running locally or thought the course platform?

Thanks for confirming. Running through the course platform. Logged out and started a new session but it still gives the same error.

Hello @Yiyi,

Please try to execute the first 8 code cells of the Lesson 1 using the same account where you had this error, including this cell:

vector = embedding[0].values
print(f"Length = {len(vector)}")

If you see the result like ‘message’ instead of array of numbers, probably you have the issue similar to this one.

As I remember when I had this issue that I mentioned then all queries like embedding, BigQuery and inference didn’t work, and it was the issue more than 1 week.

Today I checked my original account again and noticed that somehow currently I don’t have this issue, so either the problem was resolved or block has expired (I don’t know precise reason because there was no feedback from technical support).
So probably if you rerun it now you will not have this error again.

But if it is still your issue then try to execute the lessons with the problems using another Google account.

Thank you.