linlinname36 / pyroscope

Automatically exported from code.google.com/p/pyroscope
GNU General Public License v2.0
0 stars 0 forks source link

unicode error rtcontrol with french messages from trackers #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As soon as i try to use the field "message" with rtcontrol :

alias rtmsg="rtcontrol -s alias,message,name 'message=?*' 
message=\!*Tried?all?trackers*"

i've got the following error :
one of my trackers has such messages : " Tracker: [Failure reason "Torrent non 
enregistré"]"

How can i solve this ?

Thx

 File "/home/user/bin/rtcontrol", line 8, in <module>
    load_entry_point('pyrocore==0.4.3dev', 'console_scripts', 'rtcontrol')()
  File "/home/user/lib/pyroscope/pyrocore/src/pyrocore/scripts/rtcontrol.py", line 639, in run
    RtorrentControl().run()
  File "/home/user/lib/pyroscope/pyrocore/src/pyrocore/scripts/base.py", line 236, in run
    self.mainloop()
  File "/home/user/lib/pyroscope/pyrocore/src/pyrocore/scripts/rtcontrol.py", line 511, in mainloop
    matches = list(view.items())
  File "/home/user/lib/pyroscope/pyrocore/src/pyrocore/torrent/engine.py", line 585, in items
    if self.matcher.match(item):
  File "/home/user/lib/pyroscope/pyrocore/src/pyrocore/util/matching.py", line 96, in match
    return all(i.match(item) for i in self)
  File "/home/user/lib/pyroscope/pyrocore/src/pyrocore/util/matching.py", line 96, in <genexpr>
    return all(i.match(item) for i in self)
  File "/home/user/lib/pyroscope/pyrocore/src/pyrocore/util/matching.py", line 188, in match
    val = (getattr(item, self._name) or '').lower()
  File "/home/user/lib/pyroscope/pyrocore/src/pyrocore/torrent/engine.py", line 281, in __get__
    return super(OnDemandField, self).__get__(obj, cls)
  File "/home/user/lib/pyroscope/pyrocore/src/pyrocore/torrent/engine.py", line 247, in __get__
    return self.valtype(self._accessor(obj) if self._accessor else obj._fields[self.name])
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 
29: ordinal not in range(128)

Original issue reported on code.google.com by manuinwa...@gmail.com on 2 Oct 2014 at 7:34

GoogleCodeExporter commented 8 years ago

Original comment by pyroscope.project on 6 Oct 2014 at 5:11

GoogleCodeExporter commented 8 years ago
fixed in rev 2219.

Original comment by pyroscope.project on 6 Oct 2014 at 5:28