recursive pypi importer prints backtrace when package does not exist

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Maxime Devos
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Ricardo Wurmus
Severity
normal
Merged with
R
R
Ricardo Wurmus wrote on 5 Mar 2022 11:46
(address . bug-guix@gnu.org)
871qzgznde.fsf@elephly.net
The recursive pypi importer prints a backtrace when a package does not exist:

Toggle snippet (30 lines)
./pre-inst-env guix import pypi -r doesnotexist
following redirection to `https://pypi.org/pypi/doesnotexist/json/'...
Backtrace:
In ice-9/boot-9.scm:
1752:10 11 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
10 (apply-smob/0 #<thunk 7fe2ed3202e0>)
In ice-9/boot-9.scm:
724:2 9 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
619:8 8 (_ #(#(#<directory (guile-user) 7fe2ed325c80>)))
In guix/ui.scm:
2229:7 7 (run-guix . _)
2192:10 6 (run-guix-command _ . _)
In guix/scripts/import.scm:
124:11 5 (guix-import . _)
In ice-9/boot-9.scm:
1752:10 4 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/scripts/import/pypi.scm:
97:21 3 (_)
In guix/import/utils.scm:
507:27 2 (recursive-import "doesnotexist" #:repo->guix-package _ #:guix-name _ #:version _ #:repo _)
497:33 1 (lookup-node "doesnotexist" #f)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Wrong number of values returned to continuation (expected 2)

The non-recursive importer does a better job here:

Toggle snippet (6 lines)
./pre-inst-env guix import pypi doesnotexist
following redirection to `https://pypi.org/pypi/doesnotexist/json/'...
guix import: error: failed to download meta-data for package 'doesnotexist'


--
Ricardo
M
M
Maxime Devos wrote on 5 Mar 2022 12:00
c4633414c9adb715313976349d22c55ba497ac0c.camel@telenet.be
Ricardo Wurmus schreef op za 05-03-2022 om 11:46 [+0100]:
Toggle quote (3 lines)
> The recursive pypi importer prints a backtrace when a package does not exist:
> [...]

This seems to be a duplicate of https://issues.guix.gnu.org/44115
and would be fixed by https://issues.guix.gnu.org/45984.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYiNC5RccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gXdAP96U8k5V6RA2KXKiKVX8ixcKF/I
uNbaKojZopHOXndvBAD/bthm63t+8GFZkdgh8mLP2hyEzoTFsNMoE/8a/A5l2Ag=
=6O6x
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 7 Mar 2022 22:53
control message for bug #44115
(address . control@debbugs.gnu.org)
87mti1a0pi.fsf@gnu.org
merge 44115 54258
quit
L
L
Ludovic Courtès wrote on 7 Mar 2022 22:55
Re: bug#44115: “guix import -r “ fails with Bactktrace instead of error
(name . zimoun)(address . zimon.toutoune@gmail.com)
87ilspa0n3.fsf@gnu.org
zimoun <zimon.toutoune@gmail.com> skribis:

Toggle quote (15 lines)
> $ guix import elpa foo -r
> Backtrace:
> 4 (primitive-load "/home/simon/.config/guix/current/bin/guix")
> In guix/ui.scm:
> 2116:12 3 (run-guix-command _ . _)
> In guix/scripts/import.scm:
> 120:11 2 (guix-import . _)
> In guix/scripts/import/elpa.scm:
> 103:16 1 (guix-import-elpa . _)
> In guix/import/utils.scm:
> 431:36 0 (recursive-import "foo" gnu #:repo->guix-package _ #:guix-name _)
>
> guix/import/utils.scm:431:36: In procedure recursive-import:
> Wrong number of values returned to continuation (expected 2)

Fixed, thanks to last year’s zimoun! :-)

5278cab3dc scripts: import: gem: Fix recursive error handling.
7229b0e858 import: cran: Return multiple values for unknown packages.
1fe81b349c import: elpa: Return multiple values for unknown packages.
6bb92098b4 import: hackage: Return multiple values for unknown packages.
434925379d import: pypi: Return multiple values for unknown packages.
ebb03447f8 import: pypi: Gracefully handle missing project home page.

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 54258@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54258
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch