Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotation_engine create_table() 502 error #80

Open
lelabbady opened this issue Jul 27, 2022 · 0 comments
Open

annotation_engine create_table() 502 error #80

lelabbady opened this issue Jul 27, 2022 · 0 comments

Comments

@lelabbady
Copy link

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)
in
2 schema_name=schema,
3 voxel_resolution=voxel_resolution,
----> 4 description = description)

~/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<title>502 Bad Gateway</title>\r\n\r\n

502 Bad Gateway

\r\n
nginx/1.21.6\r\n\r\n\r\n'`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant