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

msg data downloader not working #156

Open
boyu-zhang-25 opened this issue Dec 2, 2022 · 16 comments · Fixed by #157
Open

msg data downloader not working #156

boyu-zhang-25 opened this issue Dec 2, 2022 · 16 comments · Fixed by #157
Assignees

Comments

@boyu-zhang-25
Copy link

I have authenticated my account, and the NeuroVista download worked just fine. For MSG, the script does not seem to work.

BTW I can get access to MSG data from the Seer website UI (34 patients). Are they the same?

Thank you!

~/De/seer-py | on master ?1  python Examples/msg_data_downloader.py                  1 err | took 7s | seer-py py | at 00:23:25
2022-12-02 00:23:46,615 Login Successful
2022-12-02 00:23:47,137 >>> {"query": "query getStudyLabelGroups($study_id: String!, $limit: PaginationAmount, $offset: Int) {\n  study(id: $study_id) {\n    id\n    name\n    labelGroups(limit: $limit, offset: $offset) {\n      id\n      name\n      description\n      labelType\n      numberOfLabels\n    }\n  }\n}", "variables": {"study_id": "fff9aaa9-b104-46e8-9227-b1b76d6f333e", "limit": 50, "offset": 0}}
2022-12-02 00:23:48,467 <<< {"errors":[{"statusCode":400,"errorCode":"INVALID_PARAMETERS","message":"Cannot query field \"labelType\" on type \"StudyLabelGroup\". Did you mean \"labels\"?","locations":[{"line":9,"column":7}]}]}

Traceback (most recent call last):
  File "/Users/mac/Desktop/seer-py/Examples/msg_data_downloader.py", line 91, in <module>
    run(SeerConnect(), args.outpath)
  File "/Users/mac/Desktop/seer-py/Examples/msg_data_downloader.py", line 58, in run
    downloader = DataDownloader(client, study_id, output_dir)
  File "/Users/mac/Desktop/seer-py/Examples/downloader/downloader.py", line 23, in __init__
    self.label_groups = self.get_label_groups()
  File "/Users/mac/Desktop/seer-py/Examples/downloader/downloader.py", line 37, in get_label_groups
    return self.client.get_label_groups_for_studies([self.study_id])
  File "/Users/mac/Desktop/seer-py/seerpy/seerpy.py", line 984, in get_label_groups_for_studies
    _results = self.get_label_groups_for_study(study_id, limit=limit)
  File "/Users/mac/Desktop/seer-py/seerpy/seerpy.py", line 956, in get_label_groups_for_study
    results = self.get_paginated_response(graphql.GET_ALL_LABEL_GROUPS_FOR_STUDY_ID_PAGED,
  File "/Users/mac/Desktop/seer-py/seerpy/seerpy.py", line 232, in get_paginated_response
    response = self.execute_query(query_string, variable_values=variable_values,
  File "/Users/mac/Desktop/seer-py/seerpy/seerpy.py", line 142, in execute_query
    response = self.graphql_client(party_id).execute(gql(query_string),
  File "/Users/mac/Desktop/seer-py/venv/lib/python3.9/site-packages/gql/client.py", line 193, in execute
    return self.execute_sync(document, *args, **kwargs)
  File "/Users/mac/Desktop/seer-py/venv/lib/python3.9/site-packages/gql/client.py", line 137, in execute_sync
    return session.execute(document, *args, **kwargs)
  File "/Users/mac/Desktop/seer-py/venv/lib/python3.9/site-packages/gql/client.py", line 447, in execute
    raise TransportQueryError(
gql.transport.exceptions.TransportQueryError: {'statusCode': 400, 'errorCode': 'INVALID_PARAMETERS', 'message': 'Cannot query field "labelType" on type "StudyLabelGroup". Did you mean "labels"?', 'locations': [{'line': 9, 'column': 7}]}
@SeymaYmn
Copy link

SeymaYmn commented Dec 8, 2022

Yes, i am getting a similar error for msg data.

@dkeden
Copy link
Contributor

dkeden commented Dec 9, 2022

Hi all, thanks for flagging this.

If you checkout to remove-deprecated-labelType-from-queries branch, this should solve the issue. Merge to the main branch should be in next couple of days.

Otherwise yes, the MSG data on the Seer web app is the same.

Please reach out if you have any further issues.

Cheers,

D

@dkeden dkeden self-assigned this Dec 9, 2022
@dkeden dkeden linked a pull request Dec 9, 2022 that will close this issue
@SeymaYmn
Copy link

SeymaYmn commented Dec 9, 2022

Thank you for your help. But I think it didn't helpful. I changed branch, now my branch is remove-deprecated-labelType-from-queries (when I checked it with git branch --show-current), but I still got the same errors.

@dkeden
Copy link
Contributor

dkeden commented Dec 16, 2022

That's surprising. Is it exactly the same error?

@dkeden
Copy link
Contributor

dkeden commented Dec 16, 2022

Are you able to indicate what query is being run for GET_ALL_LABEL_GROUPS_FOR_STUDY_ID_PAGED on ln 195 of graphql.py?

@SeymaYmn
Copy link

Sorry, that's my fault. After changing the branch, I tried to download directly. I didn't install. Now it is working. Thank you.

@dkeden
Copy link
Contributor

dkeden commented Dec 19, 2022 via email

@motaIA
Copy link

motaIA commented May 19, 2023

Hello @dkeden ,

I am having issues when running msg_data_downloader.py :

Am I missing an authorization? It succesfully logged into the Seer platform.

image

After checking out the remove-deprecated-labelType-from-queries branch, I ran "pip install ." once again before trying use msg_data_downloader.py. Am I missing something?

This is the query on ln 95 of graphql.py:

image

Appreciate the help.

@dkeden dkeden reopened this May 30, 2023
@dkeden
Copy link
Contributor

dkeden commented May 30, 2023

Hi @motaIA,

Apologies for the delay. It does look like there are auth issues - I'll have a look into this this week and get back to you ASAP.

Cheers, Dominique

@motaIA
Copy link

motaIA commented May 30, 2023 via email

@dkeden
Copy link
Contributor

dkeden commented May 31, 2023

Hi @motaIA,

Not a problem. It looks like you haven't been given access yet.

Unfortunately I am unable to see the provided email address. If you could reach out to Dr Levin Kuhlmann again, he should be able to assist you.

Let me know if I can be of any further assistance.

Best,
Dominique

@motaIA
Copy link

motaIA commented Jun 7, 2023

Hi @dkeden,

I have sent another email and haven't heard back yet. I think my email address should now be public in Github (my seerGP account is mota-at-vt-dot-edu), I would appreaciate it if you can get in touch with me, so that we can resolve the authorization.

I am working on a university project on surveying different Seizure Detection algorithms, and I am very interested in using the MSG dataset.

Thanks in advance for you help.

@dkeden
Copy link
Contributor

dkeden commented Jun 14, 2023

Hi @motaIA, apologies for the delayed response. Absolutely, sounds great! Good to hear of the project.

I reached out to Dr Kuhlmann on Thu, 8 Jun. He should authorise your access.

Let me know if I can assist further.

@dkeden
Copy link
Contributor

dkeden commented Jun 14, 2023

Hi @motaIA, are you able to contact me on [email protected] with the email address associated with your Seer account?

I should be able to authorise your access internally if not already given.

Best,
Dominique

@motaIA
Copy link

motaIA commented Jun 14, 2023 via email

@dkeden
Copy link
Contributor

dkeden commented Jun 14, 2023 via email

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

Successfully merging a pull request may close this issue.

4 participants