dmarx / video-killed-the-radio-star

Notebook and tools for end-to-end automation of music video production with generative AI
https://colab.research.google.com/github/dmarx/video-killed-the-radio-star/blob/main/Video_Killed_The_Radio_Star_Defusion.ipynb#scrollTo=oPbeyWtesAoh
MIT License
196 stars 35 forks source link

AttributeError: '_idat' object has no attribute 'fileno' and BrokenPipeError: [Errno 32] Broken pipe` #140

Closed Vismunde45 closed 1 year ago

Vismunde45 commented 1 year ago

Using google collab hugging face FPS: 30 n_variations: 10 duration: 467 seconds

I'm not sure what all info could be helpful, I'm programming illiterate, but I get the following error when I compile the images after the above specifications

` /usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py:504 in _save │ │ │ │ 501 │ │ fp.flush() │ │ 502 │ │ return │ │ 503 │ try: │ │ ❱ 504 │ │ fh = fp.fileno() │ │ 505 │ │ fp.flush() │ │ 506 │ except (AttributeError, io.UnsupportedOperation) as exc: │ │ 507 │ │ # compress to Python file-compatible object │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ AttributeError: '_idat' object has no attribute 'fileno'

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ in <cell line: 117>:122 │ │ │ │ /usr/local/lib/python3.10/dist-packages/PIL/Image.py:2240 in save │ │ │ │ 2237 │ │ │ │ fp = builtins.open(filename, "w+b") │ │ 2238 │ │ │ │ 2239 │ │ try: │ │ ❱ 2240 │ │ │ save_handler(self, fp, filename) │ │ 2241 │ │ finally: │ │ 2242 │ │ │ # do what we can to clean up │ │ 2243 │ │ │ if open_fp: │ │ │ │ /usr/local/lib/python3.10/dist-packages/PIL/PngImagePlugin.py:1348 in _save │ │ │ │ 1345 │ if save_all: │ │ 1346 │ │ _write_multiple_frames(im, fp, chunk, rawmode) │ │ 1347 │ else: │ │ ❱ 1348 │ │ ImageFile._save(im, _idat(fp, chunk), [("zip", (0, 0) + im.size, 0, rawmode)]) │ │ 1349 │ │ │ 1350 │ if info: │ │ 1351 │ │ for info_chunk in info.chunks: │ │ │ │ /usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py:519 in _save │ │ │ │ 516 │ │ │ else: │ │ 517 │ │ │ │ while True: │ │ 518 │ │ │ │ │ l, s, d = e.encode(bufsize) │ │ ❱ 519 │ │ │ │ │ fp.write(d) │ │ 520 │ │ │ │ │ if s: │ │ 521 │ │ │ │ │ │ break │ │ 522 │ │ │ if s < 0: │ │ │ │ /usr/local/lib/python3.10/dist-packages/PIL/PngImagePlugin.py:1044 in write │ │ │ │ 1041 │ │ self.chunk = chunk │ │ 1042 │ │ │ 1043 │ def write(self, data): │ │ ❱ 1044 │ │ self.chunk(self.fp, b"IDAT", data) │ │ 1045 │ │ 1046 │ │ 1047 class _fdat: │ │ │ │ /usr/local/lib/python3.10/dist-packages/PIL/PngImagePlugin.py:1031 in putchunk │ │ │ │ 1028 │ data = b"".join(data) │ │ 1029 │ │ │ 1030 │ fp.write(o32(len(data)) + cid) │ │ ❱ 1031 │ fp.write(data) │ │ 1032 │ crc = _crc32(data, _crc32(cid)) │ │ 1033 │ fp.write(o32(crc)) │ │ 1034 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ BrokenPipeError: [Errno 32] Broken pipe`