[issue52] smart info UnicodeEncodeError

Ben Severs at Labix Tracker tracker at labix.org
Mon Nov 28 08:32:44 PST 2005


New submission from Ben Severs <benjaminsevers at gmail.com>:

When doing a "smart info" (using smart 0.40 on RHEL4 x86_64) I get the following
error:

Traceback (most recent call last):
  File "/usr/bin/smart", line 193, in ?
    main(sys.argv[1:])
  File "/usr/bin/smart", line 166, in main
    exitcode = iface.run(opts.command, opts.argv)
  File "/usr/lib64/python2.3/site-packages/smart/interface.py", line 53, in run
    result = _command.main(self._ctrl, opts)
  File "/usr/lib64/python2.3/site-packages/smart/commands/info.py", line 131, in
main
    print "", line
UnicodeEncodeError: 'ascii' codec can't encode character u'\xae' in position 47:
ordinal not in range(128)

I patched smart/commands/info.py with the following.  I'm not positive if this
is the best fix, but it works.

131c131
<             print "", line
---
>             print "", line.encode('ascii', 'ignore')

----------
messages: 131
nosy: seventyfour
priority: bug
project: smart
status: unread
title: smart info UnicodeEncodeError

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



More information about the Smart mailing list