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

Raw YUV capture example failing #30

Closed
waveform80 opened this issue Nov 28, 2013 · 1 comment
Closed

Raw YUV capture example failing #30

waveform80 opened this issue Nov 28, 2013 · 1 comment
Assignees
Labels
Milestone

Comments

@waveform80
Copy link
Owner

jbeale reports that the YUV raw capture example fails at the point numpy attempts to read from the stream. I've replicated the issue in python 2 (in python 3 it just segfaults - another numpy issue or a bad build?) - although for the life of me I could swear this used to work. Numpy doesn't even seem to like loading the data from an opened file object. I can only get it working with a filename; that's doubly strange because with a filename the example never could've worked (the file would always start reading from 0) and I've definitely had this working in the past. Is this an upstream issue with some recent release of numpy? Need to investigate numpy's source...

@ghost ghost assigned waveform80 Nov 28, 2013
@waveform80
Copy link
Owner Author

Oh dear - numpy's fromfile method is C-based and grabs the underlying FILE* pointer from the python object. Hence, it'll only work with the result of open() - not io.open() (in Python 2), or any other sort of file-like object at all. I can understand why they wanted a method that was as fast as possible, but why on earth they didn't make this a special fast-path case and have a pure Python general case I've no idea. If I can find the time I'll try and make a patch for upstream - in the meantime, I'll just have to correct the picamera example to use a temporary file (urgh).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant