From unknown Sun Aug 17 01:22:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18831: Error handling in guix import? Resent-From: Ian Denhardt Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 25 Oct 2014 16:11:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18831 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 18831@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.141425345414740 (code B ref -1); Sat, 25 Oct 2014 16:11:08 +0000 Received: (at submit) by debbugs.gnu.org; 25 Oct 2014 16:10:54 +0000 Received: from localhost ([127.0.0.1]:35404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi3vT-0003pU-Rt for submit@debbugs.gnu.org; Sat, 25 Oct 2014 12:10:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37603) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XhxVo-0006qQ-Af for submit@debbugs.gnu.org; Sat, 25 Oct 2014 05:19:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhxVd-00056b-Sa for submit@debbugs.gnu.org; Sat, 25 Oct 2014 05:19:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhxVd-00056X-Pi for submit@debbugs.gnu.org; Sat, 25 Oct 2014 05:19:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhxVY-0003RB-Tf for bug-guix@gnu.org; Sat, 25 Oct 2014 05:19:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhxVU-00055z-2K for bug-guix@gnu.org; Sat, 25 Oct 2014 05:19:36 -0400 Received: from zenhack.net ([198.7.57.215]:56455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhxVT-00054m-VU for bug-guix@gnu.org; Sat, 25 Oct 2014 05:19:32 -0400 Received: from zenhack.net (localhost [127.0.0.1]) by zenhack.net (8.14.9/8.14.9) with ESMTP id s9P9JPTE009431 for ; Sat, 25 Oct 2014 04:19:25 -0500 (EST) (envelope-from ian@zenhack.net) Received: (from ian@localhost) by zenhack.net (8.14.9/8.14.9/Submit) id s9P9JOgH009430; Sat, 25 Oct 2014 04:19:24 -0500 (EST) (envelope-from ian@zenhack.net) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="===============0601093957441500511==" MIME-Version: 1.0 Content-Disposition: inline Message-ID: <20141025091917.9140.16018@vulcan.local.tld> From: Ian Denhardt User-Agent: alot/0.3.6 Date: Sat, 25 Oct 2014 05:19:17 -0400 X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Mailman-Approved-At: Sat, 25 Oct 2014 12:10:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) --===============0601093957441500511== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable So I was trying to play with the pypi importer, and (as a test) ran: guix import pypi schema and got back: starting download of `/tmp/guix-file.5J1eOy' from `https://pypi.python.= org/pypi/schema/json'... ;;; Failed to autoload make-session in (gnutls): ;;; ERROR: missing interface for module (gnutls) ERROR: In procedure module-lookup: Unbound variable: make-session failed to download "/tmp/guix-file.5J1eOy" from "https://pypi.python.or= g/pypi/schema/json" Backtrace: In ice-9/boot-9.scm: 157: 13 [catch #t # ...] In unknown file: ?: 12 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 11 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 10 [eval # #] In ice-9/boot-9.scm: 2401: 9 [save-module-excursion #] 4050: 8 [#] 1724: 7 [%start-stack load-stack ...] 1729: 6 [#] In unknown file: ?: 5 [primitive-load "/home/isd/src/guix/scripts/guix"] In guix/ui.scm: 776: 4 [run-guix-command import "pypi" "schema"] In guix/scripts/import.scm: 109: 3 [guix-import "pypi" "schema"] In guix/import/pypi.scm: 167: 2 [pypi->guix-package "schema"] 112: 1 [latest-source-release #f] In unknown file: ?: 0 [find # #f] = ERROR: In procedure find: ERROR: In procedure find: Wrong type argument in position 2 (expecting = list): #f It's obvious from the stuff at the beginning that there's some underlying issue to due with gnutls that's causing the url fetch to fail. My hunch is that's just my system, However, it's perfectly reasonable to expect it to fail under more normal circumstances - e.g. you're not connected to a network. I poked through the source a bit, and it looks like the importer is just not checking for errors from (guix build download)'s url-fetch (which returns #f on error), so when it fails you get a stack trace like the above. We should do a proper check for download failures, and print an intelligible error message. -Ian --===============0601093957441500511== MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Description: signature Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJUS2sVAAoJEPZUuMfUyjy47w8QALFor8O29yi0tAiXx+E0KnA9 MzMgrTD/JUjyzS8wvJihBQVygtQVjqO4DvjJVM6nAw8UUzpDZHmCgMsztm+voorj BOTGdk8kXoZ4eHzdpDRyO8dmQF+x2V+fKT/wfYTCHZ9u2G7IzajzUJ+vM3Rlmb5G /1FknaVxNaRdLY5LfWZsDDF3YFRbZXYzL7Qf0FFRWnO4Bgr32djDq+qrFRhEVCOw Q08na88qz7I7HZVglR7I/qV89Cjq/bJ/uYFIhjT/Fx68dMV3DEOUTbaJMEJuokq6 jUvLombfAo3IJCmsaOZn5YqOT13EpjV8RXOFrrCDTiUrcCcMLMKKvbX3BkFuXkl2 Y5syPaT7EQt8biofBvdxHDeRhvnRxd+7i1vWjV99BhvkzdypAqfsg5HHbV9W/5Ly D1Or+K9IhxqEkgF1fB/5nlDAZH0w381OvbM3HXkFeB5hsYmvdUH5onjYeHSPdubL YpAz9Zaj9dPqS28042wqULR+Z1QCPVZVgj1qCjBeD1rqo+VtnM9RykjxiUJhVpu7 AGEMgcQLRVTGFggC6xJ+Oa+/SWH2JnJnuUyeF2u3f2icDlrtUwMRfQeynUl6L2xV +VX6RvM97mggw7C614isg2sbjtQPNp4Naw0iCVTk7gBjNYj+OD1nQz5s88LVY1W+ sEoVgzjl5NVPjlFFCIqD =51pm -----END PGP SIGNATURE----- --===============0601093957441500511==-- From unknown Sun Aug 17 01:22:37 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ian Denhardt Subject: bug#18831: closed (Re: bug#18831: Error handling in guix import?) Message-ID: References: <87zjc54lwz.fsf@gnu.org> <20141025091917.9140.16018@vulcan.local.tld> X-Gnu-PR-Message: they-closed 18831 X-Gnu-PR-Package: guix Reply-To: 18831@debbugs.gnu.org Date: Wed, 05 Nov 2014 17:07:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1415207222-14314-1" This is a multi-part message in MIME format... ------------=_1415207222-14314-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #18831: Error handling in guix import? which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 18831@debbugs.gnu.org. --=20 18831: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18831 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1415207222-14314-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 18831-done) by debbugs.gnu.org; 5 Nov 2014 17:06:25 +0000 Received: from localhost ([127.0.0.1]:50306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xm42L-0003ho-9g for submit@debbugs.gnu.org; Wed, 05 Nov 2014 12:06:25 -0500 Received: from hera.aquilenet.fr ([141.255.128.1]:39760) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xm42I-0003he-UZ for 18831-done@debbugs.gnu.org; Wed, 05 Nov 2014 12:06:24 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B290F3F15; Wed, 5 Nov 2014 18:06:21 +0100 (CET) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7C0DuWCgPRy0; Wed, 5 Nov 2014 18:06:21 +0100 (CET) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 6282E3C2E; Wed, 5 Nov 2014 18:06:21 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Ian Denhardt Subject: Re: bug#18831: Error handling in guix import? References: <20141025091917.9140.16018@vulcan.local.tld> Date: Wed, 05 Nov 2014 18:06:20 +0100 In-Reply-To: <20141025091917.9140.16018@vulcan.local.tld> (Ian Denhardt's message of "Sat, 25 Oct 2014 05:19:17 -0400") Message-ID: <87zjc54lwz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18831-done Cc: 18831-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Thanks for the report and analysis. This is fixed in 467a3c9. Ian Denhardt skribis: > starting download of `/tmp/guix-file.5J1eOy' from `https://pypi.pytho= n.org/pypi/schema/json'... > ;;; Failed to autoload make-session in (gnutls): > ;;; ERROR: missing interface for module (gnutls) > ERROR: In procedure module-lookup: Unbound variable: make-session As for this part, note that GnuTLS is actually required here, because pypi.python.org is only accessibly over HTTPS here. We=E2=80=99ll make that clear in the manual. Ludo=E2=80=99. ------------=_1415207222-14314-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Oct 2014 16:10:54 +0000 Received: from localhost ([127.0.0.1]:35404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi3vT-0003pU-Rt for submit@debbugs.gnu.org; Sat, 25 Oct 2014 12:10:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37603) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XhxVo-0006qQ-Af for submit@debbugs.gnu.org; Sat, 25 Oct 2014 05:19:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhxVd-00056b-Sa for submit@debbugs.gnu.org; Sat, 25 Oct 2014 05:19:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhxVd-00056X-Pi for submit@debbugs.gnu.org; Sat, 25 Oct 2014 05:19:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhxVY-0003RB-Tf for bug-guix@gnu.org; Sat, 25 Oct 2014 05:19:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XhxVU-00055z-2K for bug-guix@gnu.org; Sat, 25 Oct 2014 05:19:36 -0400 Received: from zenhack.net ([198.7.57.215]:56455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XhxVT-00054m-VU for bug-guix@gnu.org; Sat, 25 Oct 2014 05:19:32 -0400 Received: from zenhack.net (localhost [127.0.0.1]) by zenhack.net (8.14.9/8.14.9) with ESMTP id s9P9JPTE009431 for ; Sat, 25 Oct 2014 04:19:25 -0500 (EST) (envelope-from ian@zenhack.net) Received: (from ian@localhost) by zenhack.net (8.14.9/8.14.9/Submit) id s9P9JOgH009430; Sat, 25 Oct 2014 04:19:24 -0500 (EST) (envelope-from ian@zenhack.net) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="===============0601093957441500511==" MIME-Version: 1.0 Content-Disposition: inline To: bug-guix@gnu.org Message-ID: <20141025091917.9140.16018@vulcan.local.tld> From: Ian Denhardt User-Agent: alot/0.3.6 Subject: Error handling in guix import? Date: Sat, 25 Oct 2014 05:19:17 -0400 X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 25 Oct 2014 12:10:45 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) --===============0601093957441500511== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable So I was trying to play with the pypi importer, and (as a test) ran: guix import pypi schema and got back: starting download of `/tmp/guix-file.5J1eOy' from `https://pypi.python.= org/pypi/schema/json'... ;;; Failed to autoload make-session in (gnutls): ;;; ERROR: missing interface for module (gnutls) ERROR: In procedure module-lookup: Unbound variable: make-session failed to download "/tmp/guix-file.5J1eOy" from "https://pypi.python.or= g/pypi/schema/json" Backtrace: In ice-9/boot-9.scm: 157: 13 [catch #t # ...] In unknown file: ?: 12 [apply-smob/1 #] In ice-9/boot-9.scm: 63: 11 [call-with-prompt prompt0 ...] In ice-9/eval.scm: 432: 10 [eval # #] In ice-9/boot-9.scm: 2401: 9 [save-module-excursion #] 4050: 8 [#] 1724: 7 [%start-stack load-stack ...] 1729: 6 [#] In unknown file: ?: 5 [primitive-load "/home/isd/src/guix/scripts/guix"] In guix/ui.scm: 776: 4 [run-guix-command import "pypi" "schema"] In guix/scripts/import.scm: 109: 3 [guix-import "pypi" "schema"] In guix/import/pypi.scm: 167: 2 [pypi->guix-package "schema"] 112: 1 [latest-source-release #f] In unknown file: ?: 0 [find # #f] = ERROR: In procedure find: ERROR: In procedure find: Wrong type argument in position 2 (expecting = list): #f It's obvious from the stuff at the beginning that there's some underlying issue to due with gnutls that's causing the url fetch to fail. My hunch is that's just my system, However, it's perfectly reasonable to expect it to fail under more normal circumstances - e.g. you're not connected to a network. I poked through the source a bit, and it looks like the importer is just not checking for errors from (guix build download)'s url-fetch (which returns #f on error), so when it fails you get a stack trace like the above. We should do a proper check for download failures, and print an intelligible error message. -Ian --===============0601093957441500511== MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Description: signature Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJUS2sVAAoJEPZUuMfUyjy47w8QALFor8O29yi0tAiXx+E0KnA9 MzMgrTD/JUjyzS8wvJihBQVygtQVjqO4DvjJVM6nAw8UUzpDZHmCgMsztm+voorj BOTGdk8kXoZ4eHzdpDRyO8dmQF+x2V+fKT/wfYTCHZ9u2G7IzajzUJ+vM3Rlmb5G /1FknaVxNaRdLY5LfWZsDDF3YFRbZXYzL7Qf0FFRWnO4Bgr32djDq+qrFRhEVCOw Q08na88qz7I7HZVglR7I/qV89Cjq/bJ/uYFIhjT/Fx68dMV3DEOUTbaJMEJuokq6 jUvLombfAo3IJCmsaOZn5YqOT13EpjV8RXOFrrCDTiUrcCcMLMKKvbX3BkFuXkl2 Y5syPaT7EQt8biofBvdxHDeRhvnRxd+7i1vWjV99BhvkzdypAqfsg5HHbV9W/5Ly D1Or+K9IhxqEkgF1fB/5nlDAZH0w381OvbM3HXkFeB5hsYmvdUH5onjYeHSPdubL YpAz9Zaj9dPqS28042wqULR+Z1QCPVZVgj1qCjBeD1rqo+VtnM9RykjxiUJhVpu7 AGEMgcQLRVTGFggC6xJ+Oa+/SWH2JnJnuUyeF2u3f2icDlrtUwMRfQeynUl6L2xV +VX6RvM97mggw7C614isg2sbjtQPNp4Naw0iCVTk7gBjNYj+OD1nQz5s88LVY1W+ sEoVgzjl5NVPjlFFCIqD =51pm -----END PGP SIGNATURE----- --===============0601093957441500511==-- ------------=_1415207222-14314-1--