Troubleshooting

This section describes issues you might have while using Python SDK.

Read time 2 minutes
Last updated 10 months ago

General issues

I'm getting some inconsistent behavior when re-initializing unity_cloud once it has been disposed

When the Python SDK is disposed and re-initialized multiple times in the same lifetime of an application, some behaviors break. The workaround is to simply avoid disposing of any modules.

Service account issues

Some methods return an exception

When using a service account as the authorization method, some calls to the Python SDK will return errors. Calls to the identity module's method will break. This is a known issues and should be resolved in a timely fashion. All calls to the user_login module will, in turn, return an invalid operation exception. This is by design as this module becomes unavailable when using the service_account module.

I have metadata and field definition errors

When adding a metadata dictionary during any entities creation or update, any error in either the key or the value can result in a validation error from the back-end. Make sure the key passed is the right one.

To identify which key is the right key to use, call unity_cloud.assets.list_field_definitions and inspect your field to get the exact key.

As for value errors, they will depend on the type of the field definition. To avoid these errors, do as follows:

  • For select and multiselect fields, make sure you are using an exact value contained in the accepted_values.
  • For timestamp, the value must be a UTC datetime respecting the ISO 8601 format.
  • For url, the value must be a valid URL beginning with either http:// or https://.
  • For user, the value must be a valid user ID.