CAVEconnectome / CAVEclient

This is the python client for accessing REST APIs within the Connectome Annotation Versioning Engine.
https://caveconnectome.github.io/CAVEclient/
MIT License
24 stars 11 forks source link

Error in l2cache.get_l2data #203

Closed schlegelp closed 3 months ago

schlegelp commented 3 months ago

Hi gents. There seems to be an issue with the L2 cache for FlyWire (public and production):

>>> import caveclient as cv
>>> client = cv.CAVEclient('flywire_fafb_public')
>>> l2_ids = client.chunkedgraph.get_leaves(720575940627895056, stop_layer=2)
>>> client.l2cache.get_l2data(l2_ids)
HTTPError: 500 Server Error: Expecting value: line 1 column 1 (char 0) for url: https://prod.flywire-daf.com/l2cache/api/v1/table/fly_v31/attributes?int64_as_str=False content:b'{\n  "code": 500,\n  "duration": 210.69073677062988,\n  "message": "Expecting value: line 1 column 1 (char 0)",\n  "timestamp": "2024-07-24 16:32:10.882770",\n  "traceback": [\n    "Traceback (most recent call last):\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/flask/app.py\\", line 1823, in full_dispatch_request\\n    rv = self.dispatch_request()\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/flask/app.py\\", line 1799, in dispatch_request\\n    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/middle_auth_client/decorators.py\\", line 296, in decorated_function\\n    return f(*args, **kwargs)\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/middle_auth_client/decorators.py\\", line 416, in decorated_function\\n    return f(*args, **kwargs)\\n",\n    "  File \\"./pcgl2cache/app/v1/routes.py\\", line 36, in decorated_function\\n    return f(*args, **kwargs)\\n",\n    "  File \\"./pcgl2cache/app/v1/routes.py\\", line 94, in attributes\\n    common.handle_attributes(table_id), int64_as_str=int64_as_str\\n",\n    "  File \\"./pcgl2cache/app/common.py\\", line 182, in handle_attributes\\n    _add_offset_to_coords(graph_id, l2ids, result)\\n",\n    "  File \\"./pcgl2cache/app/common.py\\", line 220, in _add_offset_to_coords\\n    cv = get_l2cache_cv(graph_id)\\n",\n    "  File \\"./pcgl2cache/app/utils.py\\", line 61, in get_l2cache_cv\\n    return CloudVolume(cv_path)\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudvolume/cloudvolume.py\\", line 230, in __new__\\n    return REGISTERED_PLUGINS[path.format](**kwargs)\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/graphene/__init__.py\\", line 58, in create_graphene\\n    auth_token=config.secrets,\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/graphene/metadata.py\\", line 95, in __init__\\n    super(GrapheneMetadata, self).__init__(cloudpath, *args, **kwargs)\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/precomputed/metadata.py\\", line 68, in __init__\\n    self.refresh_provenance()\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/precomputed/metadata.py\\", line 352, in refresh_provenance\\n    self.provenance = self.fetch_provenance()\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudvolume/datasource/precomputed/metadata.py\\", line 384, in fetch_provenance\\n    provfile = cf.get(\'provenance\')\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudfiles/cloudfiles.py\\", line 99, in inner_decor\\n    return fn(*args, **kwargs)\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudfiles/cloudfiles.py\\", line 414, in get\\n    ret = download(first(paths))\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudfiles/cloudfiles.py\\", line 399, in download\\n    raise error\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudfiles/cloudfiles.py\\", line 383, in download\\n    with self._get_connection() as conn:\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudfiles/cloudfiles.py\\", line 290, in _get_connection\\n    composite_upload_threshold=self.composite_upload_threshold,\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudfiles/interfaces.py\\", line 517, in __init__\\n    self._bucket = GC_POOL[GCloudBucketPoolParams(self._path.bucket, self._request_payer)].get_connection(secrets, None)\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudfiles/interfaces.py\\", line 38, in __missing__\\n    ret = self[key] = self.default_factory(key)\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudfiles/interfaces.py\\", line 58, in <lambda>\\n    GC_POOL = keydefaultdict(lambda params: GCloudBucketPool(params.bucket_name, params.request_payer))\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudfiles/connectionpools.py\\", line 133, in __init__\\n    self.project, self.credentials = google_credentials(bucket)\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/cloudfiles/secrets.py\\", line 74, in google_credentials\\n    .from_service_account_file(google_credentials_path)\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/google/oauth2/service_account.py\\", line 261, in from_service_account_file\\n    filename, require=[\\"client_email\\", \\"token_uri\\"]\\n",\n    "  File \\"/usr/local/lib/python3.7/site-packages/google/auth/_service_account_info.py\\", line 81, in from_filename\\n    data = json.load(json_file)\\n",\n    "  File \\"/usr/local/lib/python3.7/json/__init__.py\\", line 296, in load\\n    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)\\n",\n    "  File \\"/usr/local/lib/python3.7/json/__init__.py\\", line 348, in loads\\n    return _default_decoder.decode(s)\\n",\n    "  File \\"/usr/local/lib/python3.7/json/decoder.py\\", line 337, in decode\\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\\n",\n    "  File \\"/usr/local/lib/python3.7/json/decoder.py\\", line 355, in raw_decode\\n    raise JSONDecodeError(\\"Expecting value\\", s, err.value) from None\\n",\n    "json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)\\n"\n  ]\n}\n'

This is with caveclient==5.22.0