From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kBCSLG2+1GM7aAEAbAwnHQ (envelope-from ) for ; Sat, 28 Jan 2023 07:19:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uJOCLG2+1GMDQAEA9RJhRA (envelope-from ) for ; Sat, 28 Jan 2023 07:19:25 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4082A9673 for ; Sat, 28 Jan 2023 07:19:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLeYM-00088d-Pn; Sat, 28 Jan 2023 01:19:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLeYL-00088H-2W for guix-devel@gnu.org; Sat, 28 Jan 2023 01:19:05 -0500 Received: from mx2.dismail.de ([159.69.191.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLeYI-0000iJ-HX for guix-devel@gnu.org; Sat, 28 Jan 2023 01:19:04 -0500 Received: from mx2.dismail.de (localhost [127.0.0.1]) by mx2.dismail.de (OpenSMTPD) with ESMTP id 72baa3a8; Sat, 28 Jan 2023 07:18:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h= mime-version:date:content-type:content-transfer-encoding:from :message-id:subject:to:cc:in-reply-to:references; s=20190914; bh=XcPNPzvCZXLDtbLrmXkIYVaLIZybVC5JQTBUgq6SvXw=; b=IhElQLeK6OcA WGnrt5zT1iHdE3ImBNIFDw6M8tJ1MwCxW3+3VjIOg0nGEOXytDf5RHrOTPyeuMih w2GvKbtKAKkcWXQ90Jow8IIekhOlDbCe1CToTnktl8+sfKWzg908eCb8uBuSkjAW wpOs6EewIzTemgTL0Bdvq1X3RPvxNYFLb6WQiwTkONHVMcqcfXvLO5y4soSahB6B 1rOxeN06hTrcK+IwlPuF0kk/glfmM9cyQkPBXupodbtFMNjGucr4AW34C0Ckeqgm GLnzVkcBrEUy2LJHIJ7aForc/I65wieBBp3IQ7sklPuiv9VvyaVTpZ9zoelvaVbi Xv8ViXdQiQ== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx2.dismail.de (OpenSMTPD) with ESMTP id 7ab7e8f3; Sat, 28 Jan 2023 07:18:59 +0100 (CET) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id c4356d88; Sat, 28 Jan 2023 07:18:59 +0100 (CET) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 15b79def (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 28 Jan 2023 07:18:58 +0100 (CET) MIME-Version: 1.0 Date: Sat, 28 Jan 2023 06:18:58 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: RainLoop/1.16.0a From: "jgart" Message-ID: <9dd71da234dba6db4b11a2f96d82c322@dismail.de> Subject: Re: debug moviepy with jgart To: "Wojtek Kosior" Cc: guix-devel@gnu.org In-Reply-To: <20230128061642.1ef7790d.koszko@koszko.org> References: <20230128061642.1ef7790d.koszko@koszko.org> Received-SPF: pass client-ip=159.69.191.136; envelope-from=jgart@dismail.de; helo=mx2.dismail.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674886765; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=WIchESOeNN5c67tAjbZrEpqtMaVoT+T+3L7Gbsl86uo=; b=eVLdyQlkqPvKQIsmJ3cLcuHWLzeX6UWl/WzAupax1oUkq0FBzGR0rgNDN7aOe36kWYlv3d 9Hu+n5UbFjotxhHN8BTZ0V0OUuKUEwZjCoHlq0S++83I5DvThUszP0M6OHvBlE9sBQUs4x SFzdw+pCbBizayMOQaIjN5YBn5bEnle4UgtAKrayoLPN2muHtxoqxMQbmPEAbjY7RcttUH fPgBvpF8mzGeaWHmw36r9NcyyBUqAPGwX9Or7TWheK6zK0vkXqrWtWOmY7BlKo4X2+UqnU oEMhpb+RBJssPiAotS2cTHAaq6kZg35LlLKdxXbhakFK/sa5eJiCZCnby+PEgA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=dismail.de header.s=20190914 header.b=IhElQLeK; dmarc=pass (policy=reject) header.from=dismail.de; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674886765; a=rsa-sha256; cv=none; b=ESP2JeRNidNrmatMk2t7QQj5JaZ2yz8ktwI4xdSRbR1ZbAw08xxV6ic5F4mmpMowV26/LA 79Pc21cR1T7+vOPq/q4cf+8hocwepDkcSUR4vrlbS9L8I0kQQd70/TsibmnBcHKrzChQsB 799rsNqu5CpYwt7NM30auHJmXTj6tobf8dqO0lQkLstCzi4FJ5ljya0Yq/ZpF5KJLJZfHY RAjIoprbuQ0pbWfQOHNSvuNgyedeiK+f9qiawzivadmqjwSrXDsp2mx+QQcH3w/0bGYbM4 s4fTz8vWWbUI5111BrAbzn6GRxWdv4t+ztZM19tK4lFrpGGhDVdnnat+ceJpgw== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=dismail.de header.s=20190914 header.b=IhElQLeK; dmarc=pass (policy=reject) header.from=dismail.de; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -7.64 X-Spam-Score: -7.64 X-Migadu-Queue-Id: 4082A9673 X-TUID: YsQuIl+lyo1V Thanks for the reply. Interestingly, there is no hypothesis code in the moviepy tests so I'm no= t sure why we get that plugins output section mentioning hypothesis. I wonder if there's a way to start pdb or pudb in the failed build enviro= nment so that I can step through the test? hmmm Will try that next... for fun Here's one test that fails: # -*- coding: utf-8 -*- """Image sequencing clip tests meant to be run with pytest.""" import os import sys import pytest from moviepy.video.io.ImageSequenceClip import ImageSequenceClip from .test_helper import TMP_DIR def test_1(): images=3D[] durations=3D[] for i in range(5): durations.append(i) images.append("media/python_logo.png") durations.append(i) images.append("media/python_logo_upside_down.png") with ImageSequenceClip(images, durations=3Ddurations) as clip: assert clip.duration =3D=3D sum(durations) clip.write_videofile(os.path.join(TMP_DIR, "ImageSequenceClip1.mp= 4"), fps=3D30) def test_2(): images=3D[] durations=3D[] durations.append(1) images.append("media/python_logo.png") durations.append(2) images.append("media/matplotlib_demo1.png") #images are not the same size.. with pytest.raises(Exception): ImageSequenceClip(images, durations=3Ddurations).close() if __name__ =3D=3D '__main__': pytest.main() and here's the test failure output: ____________________________________ test_1 _____________________________= _______ def test_1(): images=3D[] durations=3D[] =20=20=20=20 =20 for i in range(5): durations.append(i) images.append("media/python_logo.png") durations.append(i) images.append("media/python_logo_upside_down.png") =20=20=20=20 =20 with ImageSequenceClip(images, durations=3Ddurations) as clip: assert clip.duration =3D=3D sum(durations) > clip.write_videofile(os.path.join(TMP_DIR, "ImageSequenceClip= 1.mp4"), fps=3D30) tests/test_ImageSequenceClip.py:25:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/ImageSequenceCli= p1.mp4' size =3D (260, 77), fps =3D None, codec =3D 'libx264', audiofile =3D None preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError -- Here's the Guix package for the curious: ;;; GNU Guix --- Functional package management for GNU ;;; ;;; Copyright =C2=A9 2022 jgart ;;; This file is not part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (guixrus packages moviepy) #:use-module (guix build-system python) #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages check) #:use-module (gnu packages fonts) #:use-module (gnu packages python-check) #:use-module (gnu packages python-web) #:use-module (gnu packages python) #:use-module (gnu packages imagemagick) #:use-module (gnu packages video) #:use-module (gnu packages python-xyz)) (define-public python-proglog (package (name "python-proglog") (version "0.1.10") (source (origin (method url-fetch) (uri (pypi-uri "proglog" version)) (sha256 (base32 "1d6s9mg2fr3dr30x05cvsvw25kpakkzqyj2zyarawk1fr34ji335")= ))) (build-system python-build-system) (propagated-inputs (list python-tqdm)) (home-page "") (synopsis "Log and progress bar manager for console, notebooks, web..= .") (description "Log and progress bar manager for console, notebooks, we= b...") (license license:expat))) (define-public python-moviepy (package (name "python-moviepy") (version "1.0.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Zulko/moviepy") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "088i5cms0bs0qcvfbbi8krgvllln62lb9rgnliz4as4j0b631c4p")= ))) (build-system python-build-system) (native-inputs (list python-coverage python-coveralls font-liberation python-pytest python-pytest-cov python-requests)) (propagated-inputs (list python-decorator python-imageio python-imageio-ffmpeg python-proglog python-requests python-tqdm)) (inputs (list ffmpeg imagemagick)) (arguments `(#:phases (modify-phases %standard-phases (replace 'check (lambda* (#:key tests? inputs #:allow-other-keys) (when tests? (invoke "pytest" "-vv"))))))) (home-page "https://zulko.github.io/moviepy/") (synopsis "Video editing with Python") (description "Video editing with Python") (license license:expat))) (define-public python-imageio-ffmpeg (package (name "python-imageio-ffmpeg") (version "0.4.7") (source (origin (method url-fetch) (uri (pypi-uri "imageio-ffmpeg" version)) (sha256 (base32 "0gkjkrmgbdcfqx010hp23ymrkp1zzmjbh88qliyf6qzkjy7q623s")= ))) (build-system python-build-system) (home-page "https://github.com/imageio/imageio-ffmpeg") (synopsis "FFMPEG wrapper for Python") (description "FFMPEG wrapper for Python") (license license:bsd-2)))