unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#54259: pypi importer prints backtrace when no source package exists
@ 2022-03-05 10:49 Ricardo Wurmus
  2022-03-08  8:35 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2022-03-05 10:49 UTC (permalink / raw)
  To: 54259

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:

--8<---------------cut here---------------start------------->8---
./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))'.
--8<---------------cut here---------------end--------------->8---

-- 
Ricardo




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#54259: pypi importer prints backtrace when no source package exists
  2022-03-05 10:49 bug#54259: pypi importer prints backtrace when no source package exists Ricardo Wurmus
@ 2022-03-08  8:35 ` Ludovic Courtès
  2022-03-08  9:07   ` zimoun
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2022-03-08  8:35 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 54259-done

Hi,

Ricardo Wurmus <rekado@elephly.net> skribis:

> 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:

[...]

> 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:

--8<---------------cut here---------------start------------->8---
$ ./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/'.
--8<---------------cut here---------------end--------------->8---

Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#54259: pypi importer prints backtrace when no source package exists
  2022-03-08  8:35 ` Ludovic Courtès
@ 2022-03-08  9:07   ` zimoun
  0 siblings, 0 replies; 3+ messages in thread
From: zimoun @ 2022-03-08  9:07 UTC (permalink / raw)
  To: 54259, Ludovic Courtès, Ricardo Wurmus; +Cc: 54259-done

Hi Ludo,

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

> 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:

    <http://issues.guix.gnu.org/issue/53165>
    <http://issues.guix.gnu.org/issue/52040>

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-08  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-05 10:49 bug#54259: pypi importer prints backtrace when no source package exists Ricardo Wurmus
2022-03-08  8:35 ` Ludovic Courtès
2022-03-08  9:07   ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).