mhe / pynrrd

Simple pure-python module for reading and writing nrrd files.
https://pynrrd.readthedocs.io/
MIT License
116 stars 51 forks source link

Memory Error while reading nrrd in Windows #107

Closed V-vp closed 4 years ago

V-vp commented 4 years ago

n,_ = nrrd.read("1.nrrd")

Traceback (most recent call last): File "", line 1, in File "C:\Users\Apex\AppData\Local\Programs\Python\Python37-32\lib\site-packages\nrrd\reader.py", line 508, in read data = read_data(header, fh, filename, index_order) File "C:\Users\Apex\AppData\Local\Programs\Python\Python37-32\lib\site-packages\nrrd\reader.py", line 439, in read_data decompressed_data += decompobj.decompress(compressed_data[start_index:end_index]) MemoryError

addisonElliott commented 4 years ago

Hello, thanks for the issue. At first glance, this seems to be because you don't have enough RAM to load the entire NRRD into memory.

Does that make sense?

V-vp commented 4 years ago

Its not ram issue. Its able to load nrrd with 100 mb size but failing in this perticular nrrd which is only 1 mb.

addisonElliott commented 4 years ago

Oh okay, well then that definitely sounds like a problem. Can you attach the NRRD file and I'll take a look at it later?

In case you need a fix immediately, this should be easy to diagnose, here are the steps I'm going to take:

V-vp commented 4 years ago

I am closing this issue since we are facing this issue in one particular windows machine.