GNU bug report logs - #54259
pypi importer prints backtrace when no source package exists

Previous Next

Package: guix;

Reported by: Ricardo Wurmus <rekado <at> elephly.net>

Date: Sat, 5 Mar 2022 10:52:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54259 in the body.
You can then email your comments to 54259 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#54259; Package guix. (Sat, 05 Mar 2022 10:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ricardo Wurmus <rekado <at> elephly.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 05 Mar 2022 10:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: bug-guix <at> gnu.org
Subject: pypi importer prints backtrace when no source package exists
Date: Sat, 05 Mar 2022 11:49:25 +0100
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




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 08 Mar 2022 08:36:01 GMT) Full text and rfc822 format available.

Notification sent to Ricardo Wurmus <rekado <at> elephly.net>:
bug acknowledged by developer. (Tue, 08 Mar 2022 08:36:02 GMT) Full text and rfc822 format available.

Message #10 received at 54259-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 54259-done <at> debbugs.gnu.org
Subject: Re: bug#54259: pypi importer prints backtrace when no source
 package exists
Date: Tue, 08 Mar 2022 09:35:51 +0100
Hi,

Ricardo Wurmus <rekado <at> 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’.




Information forwarded to bug-guix <at> gnu.org:
bug#54259; Package guix. (Tue, 08 Mar 2022 09:08:02 GMT) Full text and rfc822 format available.

Message #13 received at 54259 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: 54259 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>, 
 Ricardo Wurmus <rekado <at> elephly.net>
Cc: 54259-done <at> debbugs.gnu.org
Subject: Re: bug#54259: pypi importer prints backtrace when no source package
 exists
Date: Tue, 8 Mar 2022 10:07:26 +0100
Hi Ludo,

On Tue, 8 Mar 2022 at 09:36, Ludovic Courtès <ludo <at> 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




Information forwarded to bug-guix <at> gnu.org:
bug#54259; Package guix. (Tue, 08 Mar 2022 09:08:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Apr 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 137 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.