Issue tracker moved to https://gitlab.archlinux.org/archlinux/aurweb/-/issues
FS#45545 - TypeError: non-empty format string passed to object.__format__
Attached to Project:
AUR web interface
Opened by Marty (vadmium) - Saturday, 04 July 2015, 07:19 GMT
Last edited by Lukas Fleischer (lfleischer) - Thursday, 09 July 2015, 12:15 GMT
Opened by Marty (vadmium) - Saturday, 04 July 2015, 07:19 GMT
Last edited by Lukas Fleischer (lfleischer) - Thursday, 09 July 2015, 12:15 GMT
|
DetailsWhen pushing changes to a package, it looks the code that reports errors is broken:
remote: error: The following errors occurred when parsing .SRCINFO in commit remote: error: df032acd9810bd3573a9d3263f4d8de3d004ce36: remote: Traceback (most recent call last): remote: File "hooks/update", line 245, in <module> remote: sys.stderr.write("error: line {:d}: {:s}\n".format(error)) remote: TypeError: non-empty format string passed to object.__format__ remote: error: hook declined to update refs/heads/master Toaur@aur4.archlinux.org/iview.git"> ssh://aur@aur4.archlinux.org/iview.git ! [remote rejected] aur -> master (hook declined) Looking at <https://projects.archlinux.org/aurweb.git/commit?id=ae2907a>, I suspect the code wasn’t changed properly: -sys.stderr.write("error: line %d: %s\n" % error) +sys.stderr.write("error: line {:d}: {:s}\n".format(error)) Depending on what “error” is, maybe it should be something like one of these: "error: line {:d}: {:s}\n".format(*error) # Strict version "error: line {}: {}\n".format(*error) # Allow types other than int, str "error: line {}: {!s}\n".format(int(error[0]), error[1]) # Truer to original There is a related error from <https://bbs.archlinux.org/viewtopic.php?id=199016> (actual error was apparently a missing install file): remote: Traceback (most recent call last): remote: File "hooks/update", line 274, in <module> remote: commit.id) remote: File "hooks/update", line 175, in die_commit remote: sys.stderr.write("error: {:s}:\n".format(commit)) remote: TypeError: non-empty format string passed to object.__format__ But from where I am sitting I can’t see what the problem is in this case. The code in the traceback seems to be a mix of old and new code. |
This task depends upon
Closed by Lukas Fleischer (lfleischer)
Thursday, 09 July 2015, 12:15 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 4.0.0.
Thursday, 09 July 2015, 12:15 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 4.0.0.
pkgbase = iview
pkgdesc = Alternative frontend for ABC TV's Iview service
[. . .]
pkgname = iview
Now, the lines in each “pkgbase” or “pkgname” section in SRCINFO have to be prefixed with a tab code:
pkgbase = iview
<tab>pkgdesc = Alternative frontend for ABC TV's Iview service
<tab>[. . .]
pkgname = iview
(<https://lists.archlinux.org/pipermail/aur-dev/2015-July/003522.html>)