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

pymaid.get_annotation_details fails with exception #244

Open
pnewstein opened this issue Apr 10, 2024 · 4 comments
Open

pymaid.get_annotation_details fails with exception #244

pnewstein opened this issue Apr 10, 2024 · 4 comments

Comments

@pnewstein
Copy link

Issue

Calling the pymaid.get_annotation_details on any neurons raises KeyError 'aaData'.

I am using the catmaid server at this url

https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/seymour

and do not have access to any other servers for testing.

Possible solution

Replacing "aaData" with "data" in the get_annotation_details function in pymaid/fetch/init.py fixes this issue.

the "aaData" key exists in two other functions: get_user_annotations, pymaid.get_logs. This change is necessary to get get_user_annotations to work. But I cannot get pymaid.get_logs to work with either "aaData" or "data". Instead, I get an exception: requests.exceptions.HTTPError: 1 errors encountered: 400 Server Error: Bad Request for url: https://neurophyla.mrc-lmb.cam.ac.uk/catmaid/drosophila/l1/seymour/1/logs/list. Perhaps this is an unrelated issue. I am personaly only interested in using the get_annotation_details function.

@clbarnes
Copy link
Collaborator

In case it's helpful in other cases, there are a few public CATMAID instances at virtual fly brain (tools -> CATMAID). The L1EM instance is just the published data from Seymour.

@schlegelp
Copy link
Collaborator

schlegelp commented Apr 12, 2024

Works just fine using the public VFB instance:

>>> import pymaid
>>> rm = pymaid.CatmaidInstance("https://fafb.catmaid.virtualflybrain.org/", api_token=None, project_id=1)
>>> pymaid.get_annotation_details(13686)
                      annotation skeleton_id      time_annotated user_id annotation_id  user
0                  FBbt:00110930       13686 2021-07-27 15:50:00     116      17515344  None
1                     KC#174-abs       13686 2021-07-27 15:31:00     116      17515269  None
2  Paper: Baltruschat et al 2021       13686 2021-07-27 14:58:00     116      17515091  None
3        Paper: Zheng et al 2020       13686 2020-05-01 14:43:00     116      15549507  None
4        Paper: Zheng et al 2022       13686 2022-07-08 10:01:00     116      17684440  None

Could you perhaps check your server's CATMAID version? For the VFB it is this:

>>> rm.catmaid_version
'2020.02.15-102-gce1dee4'

@pnewstein
Copy link
Author

My catmaid_version is '2021.12.21.dev0+unknown'

Supporting this version of catmaid doesn't seem like it should be a high priority if it is not used in the public servers. I will just use the public servers for this information in the future.

Thanks!

@schlegelp
Copy link
Collaborator

Maybe @tomka can weigh in?

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

3 participants