Troubleshooting¶
Common pitfalls¶
Symptom |
Cause and fix |
|---|---|
|
|
My recommended parameters disappeared |
|
No avatars, only metrics |
|
|
After |
|
Pass |
|
No run has this exact name (case-sensitive). For a web job, run it in the web application first. |
I get the results of an older run |
Several runs have the same name: the most recent one is used. Give unique names, or use |
|
|
The server does not find the data of a replayed YAML |
The file name in the YAML ( |
|
Import |
The plot does not show in my notebook |
Use |
Understanding errors¶
Most of your actions succeed. This section explains the errors that can happen, and how to correct them.
Timeout("The call timed out. Consider increasing the timeout with the 'timeout' parameter.")The call takes too long on the server, usually during a job or the upload or download of a dataset. See Handling timeouts.
Validation errors
Validation errors come from a bad input. The error messages use HTTP status codes: codes from 400 to 499 are user errors, codes from 500 to 599 are server errors.
You can correct a user error by changing your parameters and trying again. The error message has this form:
Got error in HTTP request: POST https://company.octopize.app/reports. Error status 400 - privacy_metrics job status is not success
It gives:
the HTTP method (
POST,GET, …);the endpoint (
/reports);the status (
400);a message that explains the error (
privacy_metrics job status is not success).
In this example, the report needs a successful privacy metrics job, but the privacy metrics job failed. Read the error of the privacy metrics job (see below), correct the input, and run again.
Failed jobs (
JobStatus.error)run()does not wait for the jobs, so it does not raise when a job fails on the server. The result methods (shuffled,privacy_metrics, …) raiseValueError: Job <name> failed with exception: ...when the job failed. To diagnose the failure, read the status and theexceptionproperty of the job:from avatars.models import JobKind job = runner.get_job(JobKind.standard) print(job.status) # JobStatus.error print(job.exception) # explanation of the error
Correct your input and run the job again.
Internal errors
An internal error is an unexpected error on the server. It comes with a 500 HTTP status code and the message
internal error. Try again, if possible with different parameters.Our error monitoring notifies us of these errors at once. Contact your Octopize contact or support@octopize.io for help while we investigate.
Handling timeouts¶
Asynchronous calls¶
Many endpoints of the Avatar API are asynchronous: you ask for something
that runs in the background, and you get the result later with another
method, for example runner.shuffled or runner.get_all_results after
runner.run.
You do not need to wait for the job to finish. You can close your script, come back later, reload the run and get the results:
from avatars.models import JobKind
runner.run(jobs_to_run=[JobKind.standard, JobKind.privacy_metrics, JobKind.signal_metrics])
runner.statuses() # the jobs are probably still queued or running
# Take a coffee break, close the script, come back in 3 minutes
runner = manager.create_runner_from_name("my_run") # in a new session
runner.statuses() # {'standard': 'finished', ...}
avatars_df = runner.shuffled("my_table")