question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BrokenPipeError: [Errno 32] Broken pipe

See original GitHub issue

hi, I had the following error: [could not acquire lock for <_io.BufferedReader name=10>…] as suggested in previous issue –> updated imageio with the updated release imageio-ffmpeg 0.4.0 rerun my code and getting the following error:

[BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/Users/xxx/opt/anaconda3/envs/cvA2Zcourse/lib/python3.7/site-packages/imageio_ffmpeg/_io.py", line 483, in write_frames
    raise IOError(msg)
OSError: [Errno 32] Broken pipe
FFMPEG COMMAND:
/Users/xxx/opt/anaconda3/envs/cvA2Zcourse/bin/ffmpeg -y -f rawvideo -vcodec rawvideo -s 1920x1080 -pix_fmt rgb24 -r 30.00 -i - -an -vcodec libx264 -pix_fmt yuv420p -crf 25 -vf scale=1920:1088 -v warning /Users/xxx/PycharmProjects/cvA2Zcourse/output.mp4
FFMPEG STDERR OUTPUT:
]

the code is simple read-write example: (Doing some Object Detection on a video)

reader = imageio.get_reader('funny_dog.mp4')
fps = reader.get_meta_data()['fps']
writer = imageio.get_writer('output.mp4', fps = fps)
for i, frame in enumerate(reader):
    frame = detect(frame, net.eval(), transform)
    writer.append_data(frame)
    print(i)
writer.close()

run on mac

@almarklein

_Originally posted by @shimrite in https://github.com/imageio/imageio/issues/482#issuecomment-588189474_

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jaewooklee93commented, Dec 7, 2020

For me, it was not the issue of ffmpeg executable, and it was simply width and height are not even number for my situation. Thus, after proper padding of np.ndarray, broken pipe error has gone.

It would be nice if more elaborated error message is given for this specific situation 😃

0reactions
almarkleincommented, Dec 7, 2020

@jaewooklee93 wow, thanks for the insight, I would not have thought of that. I cannot produce the error this way, but maybe a combination of things can cause this to happen.

If anyone else could try and see if this would fix it, that would be great! We could then also look into creating a solution for this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent errno 32 broken pipe? - python - Stack Overflow
The broken pipe error usually occurs if your request is blocked or takes too long and after request-side timeout, it'll close the connection...
Read more >
“[Errno 32] Broken pipe” in Python - LinuxPip
"Broken pipe" is essentially an IOError error (short for input/output error), which happened at the Linux system level. It usually occurs when ...
Read more >
Broken Pipe Error in Python - GeeksforGeeks
A broken Pipe Error is generally an Input/Output Error, which is occurred at the Linux System level. The error has occurred during the ......
Read more >
Linux Error: 32: Broken pipe - Burleson Consulting
Answer: The Linux error 32 broken pipe indicates that the listener process could not create a dedicated server process to hand the client...
Read more >
brokenpipeerror errno 32 broken pipe multiprocessing
dump(obj) BrokenPipeError: [Errno 32] Broken pipe. not i use win7. when i use dataloader with number of worker any number greater than 0...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found