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 native reader fails on full disk image #278

Closed
sjoro opened this issue May 2, 2018 · 1 comment
Closed

msg native reader fails on full disk image #278

sjoro opened this issue May 2, 2018 · 1 comment
Assignees

Comments

@sjoro
Copy link
Collaborator

sjoro commented May 2, 2018

Code Sample, a minimal, complete, and verifiable piece of code

nat = Scene(f,reader='native_msg')

Problem description

MSG Native reader gets a ValueError when using a full disk image file

Expected Output

no error

Actual Result, Traceback if applicable

~/fork/satpy/satpy/readers/native_msg.py in _get_memmap(self)
     99             hdr_size = self.header.dtype.itemsize
    100             import ipdb; ipdb.set_trace()
--> 101             return np.memmap(fp_, dtype=dt, shape=(self.data_len,),
    102                              offset=hdr_size, mode="r")
    103 

~/dev/lib/python3.4/site-packages/numpy-1.14.2-py3.4-linux-x86_64.egg/numpy/core/memmap.py in __new__(subtype, filename, dtype, mode, offset, shape, order)
    262         bytes -= start
    263         array_offset = offset - start
--> 264         mm = mmap.mmap(fid.fileno(), bytes, access=acc, offset=start)
    265 
    266         self = ndarray.__new__(subtype, shape, dtype=descr, buffer=mm,

ValueError: mmap length is greater than file size

Versions of Python, package at hand and relevant dependencies

3.4.6
Thank you for reporting an issue !

@sjoro
Copy link
Collaborator Author

sjoro commented May 8, 2018

Fixed and merged to develop

@sjoro sjoro closed this as completed May 8, 2018
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

No branches or pull requests

1 participant