pypi importer prints backtrace when no source package exists

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Ricardo Wurmus
  • zimoun
Owner
unassigned
Submitted by
Ricardo Wurmus
Severity
normal
R
R
Ricardo Wurmus wrote on 5 Mar 2022 11:49
(address . bug-guix@gnu.org)
87wnh8y8oi.fsf@elephly.net
The only download for the kaleido package on Pypi is a binary. There is
no source code on Pypi. The importer recognizes this but then prints a
confusing backtrace when attempting to print a hint:

Toggle snippet (41 lines)
./pre-inst-env guix import pypi kaleido
guix import: error: no source release for pypi package kaleido 0.2.1.post1

hint: Backtrace:
In ice-9/boot-9.scm:
1752:10 18 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In unknown file:
17 (apply-smob/0 #<thunk 7f6fab4442e0>)
In ice-9/boot-9.scm:
724:2 16 (call-with-prompt _ _ #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
619:8 15 (_ #(#(#<directory (guile-user) 7f6fab449c80>)))
In guix/ui.scm:
2229:7 14 (run-guix . _)
2192:10 13 (run-guix-command _ . _)
In guix/scripts/import.scm:
124:11 12 (guix-import . _)
In ice-9/boot-9.scm:
1752:10 11 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/scripts/import/pypi.scm:
99:28 10 (_)
In guix/memoization.scm:
98:0 9 (mproc "kaleido" #:version #f)
In unknown file:
8 (_ #<procedure 7f6fa9f85380 at guix/memoization.scm:179:32 ()> #<procedure list _> (this is nothing))
In ice-9/boot-9.scm:
1685:16 7 (raise-exception _ #:continuable? _)
In guix/ui.scm:
806:16 6 (_ _)
316:5 5 (display-hint _ _)
1434:24 4 (texi->plain-text _)
In texinfo.scm:
1132:22 3 (parse _)
980:31 2 (loop #<input: string 7f6fa7652620> (*fragment*) _ _ _)
1064:40 1 (_ _ _ (" " "source. To build it from source, refer to the upstream repository at" " " "package is available on PyPI, but o…" …) …)
92:2 0 (loop _ _ _ _)

texinfo.scm:92:2: In procedure loop:
Throw to key `parser-error' with args `(#f "@-command expected more arguments:" () (url #:opt title replacement) (url #:opt title replacement))'.

--
Ricardo
L
L
Ludovic Courtès wrote on 8 Mar 2022 09:35
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 54259-done@debbugs.gnu.org)
87a6e0aljs.fsf@gnu.org
Hi,

Ricardo Wurmus <rekado@elephly.net> skribis:

Toggle quote (9 lines)
> The only download for the kaleido package on Pypi is a binary. There is
> no source code on Pypi. The importer recognizes this but then prints a
> confusing backtrace when attempting to print a hint:
>
> ./pre-inst-env guix import pypi kaleido
> guix import: error: no source release for pypi package kaleido 0.2.1.post1
>
> hint: Backtrace:

[...]

Toggle quote (3 lines)
> texinfo.scm:92:2: In procedure loop:
> Throw to key `parser-error' with args `(#f "@-command expected more arguments:" () (url #:opt title replacement) (url #:opt title replacement))'.

Fixed in ebb03447f8cc93b9e070b3e7706d7a64d5d1772c.

The problem was with projects that lack a home page on PyPI. For
others, the result looks like this:

Toggle snippet (8 lines)
$ ./pre-inst-env guix import pypi torch
guix import: error: no source release for pypi package torch 1.10.2

hint: This indicates that the package is available on PyPI, but only as a "wheel" containing
binaries, not source. To build it from source, refer to the upstream repository at
`https://pytorch.org/'.

Ludo’.
Closed
Z
Z
zimoun wrote on 8 Mar 2022 10:07
(address . 54259-done@debbugs.gnu.org)
CAJ3okZ0SnTUtF=88pxFzgsjY8LVb+yXDfH3hwM+VQjVLCtg+EQ@mail.gmail.com
Hi Ludo,

On Tue, 8 Mar 2022 at 09:36, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (5 lines)
> Fixed in ebb03447f8cc93b9e070b3e7706d7a64d5d1772c.
>
> The problem was with projects that lack a home page on PyPI. For
> others, the result looks like this:

Well, we are fixing importer per importer when the same issue appears
across many if not all the importers. For instance, a similar issue
for opam:


And I remember one about hackage but I cannot find the report -- maybe
fixed since then.

My point is : the importers would deserve a revamp and refactoring.
Maybe an Outreachy project. :-)


Cheers,
simon
?