Can't export segmentation as Dicom RTStruct in Python Script

Operating system: Python Script
Slicer version: 4.11.20210226
Dear authors,
Everything seems to be really good when i exported it by hand and I’ve followed your instructions video of exporting RT-STRUCT file by right click at Study and choose Export to DICOM then click in RT struct and got the result as i want.

But when i was doing it in python script by the following code, after passing the studyID as parameter, i got the result return ‘Exportable list contains no exportables’. Then, i have also tried to pass the segmentationID, but got another warning : ‘Must export the primary anatomical (CT/MR) image’. How can i fix this problem ?

Hope you reply me soon. Thank you so much.

This is a duplicate of this issue:

@Namng1210 Please do not duplicate threads especially without mentioning the other one as the community members helping you will duplicate work that others did in other threads.

Also I just see an email about your comment to that GitHub issue that it worked, but then you seem to have removed that comment. Then you post the original question here without any of the suggestions, and there is no trace about any information why that solution that seemed to work, finally (apparently) didn’t.

Now that we have a thread about this on GitHub let’s keep the discussion there, and a good start would be to react to the last suggestion. Thank you

Dear author,
This question was actually posted at the same time as my post on github.I’m so sorry because at that time, i really wanted to solve the problem and this is the first time that I joined this community.
Thanks a lot for your help and i’ll learn from my mistakes next time.
Best regards,
Nguyen Phuong Nam

Vào Th 4, 7 thg 4, 2021 vào lúc 21:28 Csaba Pinter via 3D Slicer Community <> đã viết: