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

Tried to use tutorial from the Pypy page and came up with error #92

Closed
oohtmeel1 opened this issue May 30, 2024 · 4 comments · Fixed by #93
Closed

Tried to use tutorial from the Pypy page and came up with error #92

oohtmeel1 opened this issue May 30, 2024 · 4 comments · Fixed by #93

Comments

@oohtmeel1
Copy link

Two weeks ago I tried to use the IDC package and it worked well.
But today I went to use it and obtained this error :
TypeError: seriesInstanceUID must be a string or list of strings

So I tried to use one of the example pieces of code that I know should work.
And that was broken too. (Same error)
I tried to use
from idc_index import index

client = index.IDCClient()

query = """
SELECT
SeriesInstanceUID
FROM
index
WHERE
Modality = 'MR'
"""

selection_df = client.sql_query(query)

client.download_from_selection(
seriesInstanceUID=selection_df["SeriesInstanceUID"].values[:10], downloadDir="."
)

Not sure if it is just me or not.

@vkt1414
Copy link
Collaborator

vkt1414 commented May 30, 2024

Hi @oohtmeel1 , thank you reporting the error in our README file! I see that selection_df["SeriesInstanceUID"].values[:10] returns an array. But we currently support only a string or list of strings. Please use something like selection_df["SeriesInstanceUID"].to_list()[:10] or list(selection_df['SeriesInstanceUID'].values[:10])instead.

Here are a few tutorials that @fedorov has put together to learn more about idc-index.
https://github.com/ImagingDataCommons/IDC-Tutorials/tree/master/notebooks/getting_started

I'll update the README.md file ASAP.

@fedorov
Copy link
Member

fedorov commented Jun 1, 2024

Thank you for reporting the issue @oohtmeel1!

@oohtmeel1
Copy link
Author

oohtmeel1 commented Jun 1, 2024 via email

@vkt1414
Copy link
Collaborator

vkt1414 commented Jun 3, 2024

We appreciate your feedback @oohtmeel1! Please feel free to let us know of any other features you wish were present in idc-index.

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.

3 participants