You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "C:\Users\E10270\AppData\Local\Programs\PyCharm Professional\plugins\python-ce\helpers\pydev\pydevconsole.py", line 364, in runcode
coro = func()
File "<input>", line 1, in <module>
File "C:\Users\E10270\AppData\Local\Programs\PyCharm Professional\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:\Users\E10270\AppData\Local\Programs\PyCharm Professional\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:\Projects\wanna-deploy\my_scripts\copy_model_test.py", line 4, in <module>
model.copy(destination_location='europe-west4')
File "C:\Users\E10270\.conda\envs\wanna-deploy-py310\lib\site-packages\google\cloud\aiplatform\models.py", line 6554, in copy
model_copy_response = lro.result(timeout=None)
File "C:\Users\E10270\.conda\envs\wanna-deploy-py310\lib\site-packages\google\api_core\future\polling.py", line 261, in result
raise self._exception
google.api_core.exceptions.PermissionDenied: 403 PERMISSION_DENIED 7: PERMISSION_DENIED```
#### Root cause
https://github.com/googleapis/python-aiplatform/blob/v1.70.0/google/cloud/aiplatform/models.py#L6667-L6673 does not accept the project, and although the model contains the correct project, it pulls the project from global initializer here: https://github.com/googleapis/python-aiplatform/blob/v1.70.0/google/cloud/aiplatform/models.py#L6725-L6727
and this causes the problem and requires people to switch the project in `gcloud`.
The text was updated successfully, but these errors were encountered:
Copying model does not let you specify the model project, takes it from
gcloud config
.Environment details
Python 3.10.12
pip 23.3 from C:\Users\E10270\.conda\envs\wanna-deploy-py310\lib\site-packages\pip (python 3.10)
google-cloud-aiplatform
version:it does not matter as the issue happens in the newest version too.
Steps to reproduce
gcloud config set project <projectA>
Code example
Stack trace
The text was updated successfully, but these errors were encountered: