Hi
I have a few hundred torrents running deluge daemon on FreeBSD, which works reasonably well. However, there is an issue with using the GTK-UI on another machine on the LAN.
Sometimes after adding a new torrent, some of the torrent lists stops loading
It seems the lists the newly added torrent is on will not load, except the "All" lists.
So the list for the tracker of the torrent won't load. The Queued list won't load, and the "No Label" list under Labels won't load.
The "All" list for State and the "All" list for Trackers load, but the new torrent does not show up in the lists.
After reconnecting it works as normal, and the torrent that was added is shown and works.
I didn't find an issue describing this in the issue tracker, so is this a new bug?
Server: Deluge 1.3.3, FreeBSD 8.2. Python 2.6.7
Client: Deluge 1.3.3, Ubuntu 11.04. Python 2.7.1, libgtk 2.24.4
GTK-UI stops working after adding torrent
GTK-UI stops working after adding torrent
When reporting issues, please include any relevant information such as OS (and version), python version (for Windows users this depends on which Deluge installer was used), Deluge version and plugin version.
Re: GTK-UI stops working after adding torrent
If you can enable debug logs to see if there are any errors that would be helpful.
I know that with quite large numbers of torrents there can be client/server issues and git master has improvements in that area.
I know that with quite large numbers of torrents there can be client/server issues and git master has improvements in that area.
Re: GTK-UI stops working after adding torrent
I expected this to be a client issue, since a reconnect seems to work, but here is what I found in the deluge daemon log:
The problem seems to be this bugger: ™[ERROR ] 18:46:40 core:225 There was an error adding the torrent file NAME_OF_TORRENT_FILE.torrent
1067 [ERROR ] 18:46:40 core:226 'ascii' codec can't encode character u'\x99' in position 124: ordinal not in range(128)
1068 Traceback (most recent call last):
1069 File "/usr/local/lib/python2.6/site-packages/deluge-1.3.3-py2.6.egg/deluge/core/core.py", line 223, in add_torrent_file
1070 torrent_id = self.torrentmanager.add(filedump=filedump, options=options, filename=filename)
1071 File "/usr/local/lib/python2.6/site-packages/deluge-1.3.3-py2.6.egg/deluge/core/torrentmanager.py", line 495, in add
1072 "wb")
1073 UnicodeEncodeError: 'ascii' codec can't encode character u'\x99' in position 124: ordinal not in range(128)
When reporting issues, please include any relevant information such as OS (and version), python version (for Windows users this depends on which Deluge installer was used), Deluge version and plugin version.
Re: GTK-UI stops working after adding torrent
What version of libtorrent are you using?
Re: GTK-UI stops working after adding torrent
That would be 0.15.7.0johnnyg wrote:What version of libtorrent are you using?
When reporting issues, please include any relevant information such as OS (and version), python version (for Windows users this depends on which Deluge installer was used), Deluge version and plugin version.
Re: GTK-UI stops working after adding torrent
A workaround for this is to disable the option "Copy of .torrent files to".
This is the line:
It seems os.path.join or open doesn't like the encoding of the filename, so I don't think this has anything to do with libtorrent.
This is the line:
Code: Select all
save_file = open(os.path.join(self.config["torrentfiles_location"], filename), "wb")
When reporting issues, please include any relevant information such as OS (and version), python version (for Windows users this depends on which Deluge installer was used), Deluge version and plugin version.
Re: GTK-UI stops working after adding torrent
Yep thats correct the filename needs to be to converted to unicode.
Try using the utf8_encoded function to see if that fixes it:
Try using the utf8_encoded function to see if that fixes it:
Code: Select all
save_file = open(os.path.join(self.config["torrentfiles_location"], utf8_encoded(filename)), "wb")
Re: GTK-UI stops working after adding torrent
That doesn't fix it.
The character isn't actually displayed correctly with UTF-8 in Firefox, so it won't work to encode as UTF8, but latin1 works:
To make this work for all encodings, you'd have to try them all out or what?
Bug Ticket: #1981
Code: Select all
[ERROR ] 01:29:30 core:225 There was an error adding the torrent file TORRENT_FILE_NAME.torrent
[ERROR ] 01:29:30 core:226 'ascii' codec can't decode byte 0xc2 in position 73: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/local/lib/python2.6/site-packages/deluge-1.3.3-py2.6.egg/deluge/core/core.py", line 223, in add_torrent_file
torrent_id = self.torrentmanager.add(filedump=filedump, options=options, filename=filename)
File "/usr/local/lib/python2.6/site-packages/deluge-1.3.3-py2.6.egg/deluge/core/torrentmanager.py", line 495, in add
save_file = open(os.path.join(self.config["torrentfiles_location"], utf8_encoded(filename)), "wb")
File "/usr/local/lib/python2.6/posixpath.py", line 70, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 73: ordinal not in range(128)
Code: Select all
save_file = open(os.path.join(self.config["torrentfiles_location"], filename.encode("latin_1", "ignore")), "wb")
Bug Ticket: #1981
Last edited by Cas on Sat Nov 26, 2011 3:18 pm, edited 1 time in total.
Reason: add bug ticket
Reason: add bug ticket
When reporting issues, please include any relevant information such as OS (and version), python version (for Windows users this depends on which Deluge installer was used), Deluge version and plugin version.