CAVEclient
CAVEclient copied to clipboard
annotation_engine create_table() 502 error
When using create_table() to create a reference table, missing arguments results in a 502 error making it difficult to parse out. Example below is trying to create a cell_type_reference table and is missing 'reference_table' and 'target_id'.
`client.annotation.create_table(table_name=table_name, schema_name='cell_type_reference', voxel_resolution=voxel_resolution, description = description)
HTTPError Traceback (most recent call last)
~/anaconda3/envs/micronsbinder/lib/python3.7/site-packages/caveclient/annotationengine.py in create_table(self, table_name, schema_name, description, voxel_resolution, reference_table, track_target_id_updates, flat_segmentation_source, user_id, aligned_volume_name) 340 341 response = self.session.post(url, json=data) --> 342 return handle_response(response, as_json=False) 343 344 def get_annotation(
~/anaconda3/envs/micronsbinder/lib/python3.7/site-packages/caveclient/base.py in handle_response(response, as_json) 75 def handle_response(response, as_json=True): 76 """Deal with potential errors in endpoint response and return json for default case""" ---> 77 _raise_for_status(response) 78 _check_authorization_redirect(response) 79 if as_json:
~/anaconda3/envs/micronsbinder/lib/python3.7/site-packages/caveclient/base.py in _raise_for_status(r) 67 68 if http_error_msg: ---> 69 raise requests.HTTPError(http_error_msg, response=r) 70 warning = r.headers.get("Warning") 71 if warning:
HTTPError: 502 Server Error: Bad Gateway for url: https://minnie.microns-daf.com/annotation/api/v2/aligned_volume/minnie65_phase3/table content:b'\r\n