Error grpc or google api script looking for wrong project

271 views
Skip to first unread message

Frede Bergen

unread,
May 3, 2021, 9:42:31 AM5/3/21
to Google Cloud Developers
I've used google SDK and have set and authorized my new project but somehow trying to run the google cloud text-to-speech python quickstart code at 



Gives this error:

Traceback (most recent call last):
  File "d:\PleaseHelp\Untitled-1.py", line 28, in <module>
    response = client.synthesize_speech(input=synthesis_input, voice=voice, audio_config=audio_config)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\google\cloud\texttospeech_v1\services\text_to_speech\client.py", line 487, in synthesize_speech
    response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\google\api_core\gapic_v1\method.py", line 145, in __call__
    return wrapped_func(*args, **kwargs)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\google\api_core\retry.py", line 286, in retry_wrapped_func
    on_error=on_error,
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\google\api_core\retry.py", line 184, in retry_target
    return target()
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\google\api_core\grpc_helpers.py", line 75, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.InvalidArgument: 400 Project 'project:Named_Of_Old_Project_That_Ive_Deleted' not found or deleted.

Where "Named_Of_Old_Project_That_Ive_Deleted" is my old google project or maybe a Visual Studio solution name or folder or both. I don't want anything looking for that old project. I simply want to run the text to speech quickstart script example using the new project I've set up configured and authorized. Any tips are welcome... seems like some global default is hanging around in some google cloud variable. (That old deleted project name was used as part of a project containerizing a flask app and putting it on google cloud run.)

Thanks for any help

David Charles Martinez

unread,
May 4, 2021, 2:14:09 PM5/4/21
to Google Cloud Developers
Hello,

It seems that your Cloud SDK installation may have become corrupted somehow. Could you please run the following command:


This will reinstall your Cloud SDK with the latest version which should clear out any configuration issue. Then please go trough the configuration process once again.
Reply all
Reply to author
Forward
0 new messages