dicom2stl icon indicating copy to clipboard operation
dicom2stl copied to clipboard

TypeError: cannot unpack non-iterable NoneType object

Open ElvezTheElf opened this issue 4 years ago • 5 comments

C:\Users\User\Desktop\Ömer\bionluk\dicom2stl-main>python dicom2stl.py dicomFiles/test/ --output test.stl

Temp dir: C:\Users\User\AppData\Local\Temp\tmpb92h54r6 Isovalue = 0.0 Error in loadLargestSeries. No files found. dicomdir = dicomFiles/test/ Traceback (most recent call last): File "C:\Users\User\Desktop\Ömer\bionluk\dicom2stl-main\dicom2stl.py", line 160, in img, modality = dicomutils.loadLargestSeries(fname[0]) TypeError: cannot unpack non-iterable NoneType object

Hello dave3d, above is the error message I get when I tried to use your script to turn an example dicom series intro stl.

I am not sure what that error means, but I also tried putting the files in a .zip file.

Thank you

ElvezTheElf avatar Aug 08 '21 04:08 ElvezTheElf

Do you have the latest code? I had that bug last week, but I think I fixed it. Can you share you dicom so that I can try it out?

Thanks, Dave

dave3d avatar Aug 09 '21 14:08 dave3d

having the same issue. Should I revert to an older version to get it working?

theScrabi avatar Oct 05 '22 17:10 theScrabi

I guess you can try that. Can you share with me a data set so I can try and debug it? The other person didn't get back to me.

dave3d avatar Oct 06 '22 00:10 dave3d

Yea, I can share with you my logs as well as my dicom data, however the later one I would like to give you in private.

theScrabi avatar Oct 15 '22 12:10 theScrabi

In my case this happened because my files didn't have extension dcm. That could be easily modified here: https://github.com/dave3d/dicom2stl/blob/6b1966649aecf2762937c067449b2a60be0ac541/utils/dicomutils.py#L42

lvonasek avatar Nov 11 '23 20:11 lvonasek