[issue172] ValueError: unsupported format character '-' (0x2d) at index 9

Ed Avis at Labix Tracker tracker at labix.org
Sun Apr 8 12:32:32 PDT 2007


Ed Avis <ed at membled.com> added the comment:

Hi, yes I can still reproduce this on Fedora Core 5 with the default set of
repositories.  However, it seems to appear only when running smart inside an
Emacs shell buffer.  (This is a way to run a subshell in Emacs and have the
output of commands appear in Emacs.)  Try starting GNU Emacs or xemacs and do
M-x shell to make the shell buffer appear, then run a smart command to install a
package.  My hunch is that the progress bar code is going wrong because smart's
output is not going to a real tty that supports querying width and height.  Here
is another example:

root at bone /home/ed/packages/SRPMS # smart install dosbox
Loading cache...
(  0%) [100%]

Computing transaction...

Installing packages (2):

736.1kB of package files are needed. 2.1MB will be used.

Confirm changes? (Y/n): y

Fetching packages...
-> http://download.fedora.redhat.com/.../SDL_net-1.2.6-2.fc6.x86_64.rpm
(  0%)(73% Stalled Unknown)(73% 4.0kB/s Unknown) [ 50%]
-> http://download.fedora.redhat.com/.../dosbox-0.70-1.fc6.x86_64.rpm
(4% 4.0kB/s 02m55s)(4% 7.0kB/s 02m55s)(6% 7.0kB/s 01m37s)(8% 7.0kB/s 01m37s)(8%
13.2kB/s 01m37s)(11% 13.2kB/s 49s)(13% 13.2kB/s 49s)(13% 17.9kB/s 49s)(15%
17.9kB/s 34s)(17% 21.4kB/s 34s)(20% 21.4kB/s 27s)(22% 24.1kB/s 27s)(24% 24.1kB/s
23s)(26% 24.1kB/s 23s)(26% 26.0kB/s 23s)(29% 26.0kB/s 20s)(29% 23.5kB/s 20s)(31%
23.5kB/s 21s)(33% 23.5kB/s 21s)(33% 25.6kB/s 21s)(35% 25.6kB/s 18s)(38% 25.6kB/s
18s)(38% 27.2kB/s 18s)(40% 27.2kB/s 16s)(42% 27.2kB/s 16s)(42% 28.4kB/s 16s)(44%
28.4kB/s 14s)(47% 28.4kB/s 14s)(47% 29.3kB/s 14s)(49% 29.3kB/s 12s)(51% 29.3kB/s
12s)(51% 30.0kB/s 12s)(53% 30.0kB/s 11s)(55% 30.5kB/s 11s)(58% 30.5kB/s 10s)(60%
30.5kB/s 10s)(60% 30.9kB/s 10s)(62% 30.9kB/s 09s)(64% 31.1kB/s 09s)(67% 31.1kB/s
08s)(67% 27.3kB/s 08s)(69% 27.3kB/s 08s)(71% 27.3kB/s 08s)(71% 28.5kB/s 08s)(73%
28.5kB/s 07s)(76% 28.5kB/s 07s)(76% 29.4kB/s 07s)(78% 29.4kB/s 05s)(80% 29.4kB/s
05s)(80% 30.0kB/s 05s)(82% 30.0kB/s 04s)(85% 30.0kB/s 04s)(85% 30.5kB/s 04s)(87%
30.5kB/s 03s)(89% 30.5kB/s 03s)(89% 30.9kB/s 03s)(91% 30.9kB/s 02s)(94% 31.2kB/s
02s) (96% 31.2kB/s 01s) (98% 31.2kB/s 01s) (98% 31.4kB/s 01s) [100%]


Committing transaction...
(  0%) [  0%]

Traceback (most recent call last):
  File "/usr/bin/smart", line 194, in ?
    main(sys.argv[1:])
  File "/usr/bin/smart", line 167, in main
    exitcode = iface.run(opts.command, opts.argv)
  File "/usr/lib64/python2.4/site-packages/smart/interface.py", line 53, in run
    result = _command.main(self._ctrl, opts)
  File "/usr/lib64/python2.4/site-packages/smart/commands/install.py", line 189,
in main
    ctrl.commitTransaction(trans, confirm=confirm)
  File "/usr/lib64/python2.4/site-packages/smart/control.py", line 505, in
commitTransaction
    return self.commitChangeSet(trans.getChangeSet(), caching, confirm)
  File "/usr/lib64/python2.4/site-packages/smart/control.py", line 563, in
commitChangeSet
    pmclass().commit(pmcs, pkgpaths)
  File "/usr/lib64/python2.4/site-packages/smart/backends/rpm/pm.py", line 218,
in commit
    probs = ts.run(cb, None)
  File "/usr/lib64/python2.4/site-packages/smart/backends/rpm/pm.py", line 309,
in __call__
    self.prog.show()
  File "/usr/lib64/python2.4/site-packages/smart/progress.py", line 110, in show
    self.expose(topic, percent, *info)
  File "/usr/lib64/python2.4/site-packages/smart/interfaces/text/progress.py",
line 107, in expose
    out.write(self._topicmaskn % (n, topic))
ValueError: unsupported format character '-' (0x2d) at index 9

root at bone /home/ed/packages/SRPMS # smart --version
smart 0.50

_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue172>
_______________________________________



More information about the Smart mailing list