Opened 4 years ago

Closed 3 years ago

#3368 closed bug (Fixed)

Viewing peers causes UnicodeDecodeErrors

Reported by: ga22be Owned by:
Priority: trivial Milestone: 2.0.4
Component: Core Version: 2.0.3
Keywords: peer, UI, UnicodeDecodeError Cc:

Description

When viewing peers in either GTK or web interface the daemon log spews UnicodeDecodeError when trying to decode "peer.client". For a while the interface still shows some peers. In the end the list is empty however. It seems that something fails silently. This creates a confusing situation where the torrent is still uploading but the peer list is empty. The peer counter still works however.

Log as follows:

17:35:52 [ERROR   ][deluge.core.rpcserver         :1418] Exception calling RPC request: 'utf-8' codec can't decode byte 0xaa in position 8: invalid start byte
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/rpcserver.py", line 326, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 768, in get_torrent_status
    all_keys=not keys,
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 743, in create_torrent_status
    torrent_keys, diff, update=update, all_keys=all_keys
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 1003, in get_status
    status_dict[key] = self.status_funcs[key]()
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 813, in get_peers
    client = decode_bytes(peer.client)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xaa in position 8: invalid start byte
17:35:54 [WARNING ][deluge.core.rpcserver         :242 ] An exception occurred while sending RPC_ERROR to client. Wrapping it and resending. Error to send(causing exception goes next):
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/rpcserver.py", line 326, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 768, in get_torrent_status
    all_keys=not keys,
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 743, in create_torrent_status
    torrent_keys, diff, update=update, all_keys=all_keys
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 1003, in get_status
    status_dict[key] = self.status_funcs[key]()
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 813, in get_peers
    client = decode_bytes(peer.client)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa4 in position 11: invalid start byte

17:35:54 [ERROR   ][deluge.core.rpcserver         :1418] Exception calling RPC request: 'utf-8' codec can't decode byte 0xa4 in position 11: invalid start byte
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/rpcserver.py", line 326, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 768, in get_torrent_status
    all_keys=not keys,
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 743, in create_torrent_status
    torrent_keys, diff, update=update, all_keys=all_keys
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 1003, in get_status
    status_dict[key] = self.status_funcs[key]()
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 813, in get_peers
    client = decode_bytes(peer.client)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa4 in position 11: invalid start byte
17:35:56 [WARNING ][deluge.core.rpcserver         :242 ] An exception occurred while sending RPC_ERROR to client. Wrapping it and resending. Error to send(causing exception goes next):
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/rpcserver.py", line 326, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 768, in get_torrent_status
    all_keys=not keys,
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 743, in create_torrent_status
    torrent_keys, diff, update=update, all_keys=all_keys
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 1003, in get_status
    status_dict[key] = self.status_funcs[key]()
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 813, in get_peers
    client = decode_bytes(peer.client)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa4 in position 11: invalid start byte

17:35:56 [ERROR   ][deluge.core.rpcserver         :1418] Exception calling RPC request: 'utf-8' codec can't decode byte 0xa4 in position 11: invalid start byte
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/rpcserver.py", line 326, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 768, in get_torrent_status
    all_keys=not keys,
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 743, in create_torrent_status
    torrent_keys, diff, update=update, all_keys=all_keys
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 1003, in get_status
    status_dict[key] = self.status_funcs[key]()
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 813, in get_peers
    client = decode_bytes(peer.client)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa4 in position 11: invalid start byte
17:35:59 [WARNING ][deluge.core.rpcserver         :242 ] An exception occurred while sending RPC_ERROR to client. Wrapping it and resending. Error to send(causing exception goes next):
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/rpcserver.py", line 326, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 768, in get_torrent_status
    all_keys=not keys,
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 743, in create_torrent_status
    torrent_keys, diff, update=update, all_keys=all_keys
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 1003, in get_status
    status_dict[key] = self.status_funcs[key]()
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 813, in get_peers
    client = decode_bytes(peer.client)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa4 in position 11: invalid start byte

17:35:59 [ERROR   ][deluge.core.rpcserver         :1418] Exception calling RPC request: 'utf-8' codec can't decode byte 0xa4 in position 11: invalid start byte
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/core/rpcserver.py", line 326, in dispatch
    ret = self.factory.methods[method](*args, **kwargs)
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 768, in get_torrent_status
    all_keys=not keys,
  File "/usr/lib/python3/dist-packages/deluge/core/core.py", line 743, in create_torrent_status
    torrent_keys, diff, update=update, all_keys=all_keys
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 1003, in get_status
    status_dict[key] = self.status_funcs[key]()
  File "/usr/lib/python3/dist-packages/deluge/core/torrent.py", line 813, in get_peers
    client = decode_bytes(peer.client)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa4 in position 11: invalid start byte

Change History (5)

comment:1 Changed 4 years ago by ga22be

Forgot to mention I'm running on Debian 10 and deluged, deluge-web, and deluge-common are apt installed from unstable.

comment:2 Changed 4 years ago by ga22be

And as always with these things this has been reported before but I couldn't find it until after making this report. I was only searching open issues.

https://dev.deluge-torrent.org/ticket/3279

comment:3 Changed 4 years ago by ga22be

Could someone with such permissions please close this ticket again as this is already fixed here: https://dev.deluge-torrent.org/changeset/4b29436cd5e

Sorry for the unnecessary duplication and clutter.

comment:4 Changed 4 years ago by ga22be

  • Milestone changed from needs verified to not applicable
  • Priority changed from minor to trivial

comment:5 Changed 3 years ago by Cas

  • Milestone changed from not applicable to 2.0.4
  • Resolution set to Fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.