CloudEnv deprecation
AnsweredHello ! I was just playing with one model and it throws an error:
CloudEnv is deprecated, use Env(params={...}) instead
This is how I initially used CloudEnv:
Now, I have tried the following, but to no avail:
-
Official comment
Hi Paul,
The parameter names to use are slightly different than the parameters to the original `CloudEnv` function. The syntax looks like this:
params = {
'CloudAccessID': '...',
'CloudSecretKey': '...',
'CloudPool': '...'
}
e = gp.Env(params=params)Best regards,
Ronald -
Thank you sooo much Ronald ! Have been digging in your manual and API reference for ages now !!
0 -
Sorry about that... the parameter names to be used as dictionary keys with this syntax are basically the official parameter names listed here. But I understand it can be confusing in the context of this deprecation message!
0 -
Additionally, are there any other changes to the API ? That's because a previously working model now spits 'the JSON object must be str, bytes or bytearray, not tuple'. Thank you !
0 -
Not sure... could you post a code snippet that illustrates the error?
0 -
It comes from a seemingly unrelated variable declaration. It's a bit weird because it worked a few days ago:
list_materials=json.loads(list_materials)['data'].It probably is a mistake of mine so I will look further into each data structure ! Thanks !0
Please sign in to leave a comment.
Comments
6 comments