#2922 closed bug (Fixed)

libtorrent 1.1 errors

Reported by: firefox Owned by: Cas
Priority: blocker Milestone: 2.0
Component: Core Version: develop (git)
Keywords: Cc:

Description

Not loading

traceback (most recent call last):

File "/media/disk/deluge/deluge/ui/gtkui/gtkui.py", line 303, in _on_reactor_start

client.start_standalone()

File "/media/disk/deluge/deluge/ui/client.py", line 601, in start_standalone

self._daemon_proxy = DaemonStandaloneProxy?(self.event_handlers)

File "/media/disk/deluge/deluge/ui/client.py", line 432, in init

self.daemon = daemon.Daemon(standalone=True)

File "/media/disk/deluge/deluge/core/daemon.py", line 100, in init

read_only_config_keys=read_only_config_keys)

File "/media/disk/deluge/deluge/core/core.py", line 88, in init

self.alertmanager = AlertManager?()

File "/media/disk/deluge/deluge/core/alertmanager.py", line 50, in init

self.session.apply_settings('alert_mask', alert_mask)

ArgumentError?: Python argument types in

session.apply_settings(session, str, int)

did not match C++ signature:

apply_settings(libtorrent::session {lvalue}, boost::python::dict)

Attachments (1)

deluge (1.2 KB) - added by firefox 18 months ago.

Download all attachments as: .zip

Change History (15)

Changed 18 months ago by firefox

comment:1 Changed 18 months ago by Cas

  • Resolution set to Fixed
  • Status changed from new to closed

Thanks, made a mistake not passing dict to apply_settings :)

Fixed: [0890cc1a33]

comment:2 Changed 18 months ago by Doadin

Idk if itd be easier to start a new ticket or not but this partially fixes the issue but it appears something else has made it past review that is causing the client to not fully start.

Traceback (most recent call last):
  File "deluge\core\daemon_entry.py", line 80, in run_daemon
    
  File "deluge\core\daemon.py", line 138, in start
    
  File "twisted/internet/base.py", line 1194, in run
    
  File "twisted/internet/base.py", line 1203, in mainLoop
    
--- <exception caught here> ---
  File "twisted/internet/base.py", line 825, in runUntilCurrent
    
  File "deluge\core\torrentmanager.py", line 425, in on_add_torrent_alert
    
  File "deluge\core\torrent.py", line 267, in __init__
    
  File "deluge\core\torrent.py", line 639, in update_state
    
  File "deluge\common.py", line 787, in decode_string
    
exceptions.AttributeError: 'error_code' object has no attribute 'decode'

is what im seeing.

comment:3 Changed 18 months ago by Cas

  • Resolution Fixed deleted
  • Status changed from closed to reopened
  • Summary changed from not loading to libtorrent 1.1 errors

Ah ok, it is related to updates for using new lt 1.1 methods and attributes.

I shall sort out testing with lt 1.1 as I only have lt 1.0 currently on my dev build.

comment:4 Changed 18 months ago by Cas

  • Owner set to Cas
  • Status changed from reopened to assigned

comment:5 Changed 18 months ago by Doadin

Yea ok i was gonna say i temp removed the code causing the issue to only find more issues. :P

I was only reporting because dev748 works fine even with 1.1 so its something you had changed. (dont wana go backward however also I understand not testing with 1.1 and working your way up)

Last edited 18 months ago by Doadin (previous) (diff)

comment:6 Changed 18 months ago by Cas

  • Resolution set to Fixed
  • Status changed from assigned to closed

The changes should have been compatible but I simply made a few mistakes and assumptions :)

Fixed the main issues now: [fd80ed75fe1a2]

comment:7 Changed 18 months ago by Doadin

Cool, yea i use dev branch with 1.0 and 1.1 all the time since it started working and most of the time it works quite nicely, i try and point things out when i notice em in some cases though im not sure which commit they where like this one but anyways thanks!

I think we might have just one more? Or maybe i just have to clear setting now? now sure but im seeing:

18:42:46.069 [ERROR   ][deluge.component                   :74  ] [Failure insta
nce: Traceback: <type 'exceptions.KeyError'>: 'unknown name in settings_pack: ou
tgoing_ports'
twisted/internet/base.py:631:iterate
twisted/internet/base.py:825:runUntilCurrent
twisted/internet/defer.py:393:callback
twisted/internet/defer.py:501:_startRunCallbacks
--- <exception caught here> ---
twisted/internet/defer.py:588:_runCallbacks
twisted/internet/task.py:865:<lambda>
deluge\core\preferencesmanager.py:146:start
deluge\core\preferencesmanager.py:160:do_config_set_func
deluge\core\preferencesmanager.py:235:_on_set_random_outgoing_ports
deluge\core\preferencesmanager.py:240:__set_outgoing_ports
deluge\core\preferencesmanager.py:164:session_set_setting
]

idk if http://www.rasterbar.com/products/libtorrent/reference-Settings.html is current but looks like we should have 1 port?and it should be "outgoing_port" and/or maybe use "num_outgoing_ports "? Not Sure However otherwise it looks like its working good.

Edit: so i think thats it log file looks clean otherwise.

Another thing i noticed not really related but wanted to check on is on the Status and details tabs the space between the separations seems to have grown. Intentional?

Last edited 18 months ago by Doadin (previous) (diff)

comment:8 Changed 18 months ago by Cas

  • Resolution Fixed deleted
  • Status changed from closed to reopened

I have fixed those settings but there is something strange happening after fixing encryption setting.

As a workaround it is falling back to the old set_settings which is fine but will need fixed. Possibly due to calling apply_settings too often on startup.

00:10:22.308 [ERROR   ][deluge.component                   :129 ] [Failure instance: Traceback: <type 'exceptions.TypeError'>: No registered converter was able to produce a C++ rvalue of type int from this Python object of type str
/usr/lib/python2.7/dist-packages/twisted/internet/_glibbase.py:333:_simulate
/usr/lib/python2.7/dist-packages/twisted/internet/base.py:825:runUntilCurrent
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:393:callback
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:501:_startRunCallbacks
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:588:_runCallbacks
/usr/lib/python2.7/dist-packages/twisted/internet/task.py:865:<lambda>
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:146:start
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:160:do_config_set_func
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:279:_on_set_enc_in_policy
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:295:_on_set_encryption
/home/calum/projects/deluge/deluge/core/core.py:153:apply_session_settings
]
Unhandled error in Deferred:
00:10:26.765 [CRITICAL][twisted                            :154 ] Unhandled error in Deferred:
00:10:26.765 [CRITICAL][twisted                            :154 ] Unhandled error in Deferred:


Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/_glibbase.py", line 333, in _simulate
    self.runUntilCurrent()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 825, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 393, in callback
    self._startRunCallbacks(result)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 501, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 588, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/task.py", line 865, in <lambda>
    d.addCallback(lambda ignored: callable(*args, **kw))
  File "/home/calum/projects/deluge/deluge/core/preferencesmanager.py", line 146, in start
    self.do_config_set_func(key, self.config[key])
  File "/home/calum/projects/deluge/deluge/core/preferencesmanager.py", line 160, in do_config_set_func
    on_set_func(key, value)
  File "/home/calum/projects/deluge/deluge/core/preferencesmanager.py", line 279, in _on_set_enc_in_policy
    self._on_set_encryption(key, value)
  File "/home/calum/projects/deluge/deluge/core/preferencesmanager.py", line 295, in _on_set_encryption
    'prefer_rc4': True}, reraise=True)
  File "/home/calum/projects/deluge/deluge/core/core.py", line 153, in apply_session_settings
    self.session.apply_settings(settings)
exceptions.TypeError: No registered converter was able to produce a C++ rvalue of type int from this Python object of type str
00:10:26.766 [CRITICAL][deluge.log                         :93  ] twisted.internet.defer 
[Failure instance: Traceback: <type 'exceptions.TypeError'>: No registered converter was able to produce a C++ rvalue of type int from this Python object of type str
/usr/lib/python2.7/dist-packages/twisted/internet/_glibbase.py:333:_simulate
/usr/lib/python2.7/dist-packages/twisted/internet/base.py:825:runUntilCurrent
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:393:callback
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:501:_startRunCallbacks
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:588:_runCallbacks
/usr/lib/python2.7/dist-packages/twisted/internet/task.py:865:<lambda>
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:146:start
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:160:do_config_set_func
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:279:_on_set_enc_in_policy
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:295:_on_set_encryption
/home/calum/projects/deluge/deluge/core/core.py:153:apply_session_settings
]
00:10:26.766 [CRITICAL][deluge.log                         :93  ] twisted.internet.defer 
[Failure instance: Traceback: <type 'exceptions.TypeError'>: No registered converter was able to produce a C++ rvalue of type int from this Python object of type str
/usr/lib/python2.7/dist-packages/twisted/internet/_glibbase.py:333:_simulate
/usr/lib/python2.7/dist-packages/twisted/internet/base.py:825:runUntilCurrent
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:393:callback
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:501:_startRunCallbacks
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:588:_runCallbacks
/usr/lib/python2.7/dist-packages/twisted/internet/task.py:865:<lambda>
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:146:start
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:160:do_config_set_func
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:279:_on_set_enc_in_policy
/home/calum/projects/deluge/deluge/core/preferencesmanager.py:295:_on_set_encryption
/home/calum/projects/deluge/deluge/core/core.py:153:apply_session_settings

comment:9 Changed 18 months ago by Cas

The spacing in Tabs was changed on purpose as I felt it was too packed together, I shall perhaps look at another option in future...

comment:10 Changed 18 months ago by Doadin

ah ok yea idk it just seems like a its a bit too far. I can see wanting space but maybe somewhere in the middle? Anyways thanks for the fixes!

comment:11 Changed 18 months ago by Doadin

I just realized it has a issue with file priorities as well. It doesnt seem to be causeing a error but the priorities are not displaying/setting right. I believe its setting priorities its just not proper ones hence no error. Or at least the files tab isnt displaying them right.

hmm this may have been just a temp error. restarting the client they seem fine now. odd. there is also possibly a issue with the limits updating in gtkui. If i change a limit the limit will change but the "(xx)" wont update to reflect that. However if i disconnect from the daemon and reconnect it shows fine.

Last edited 18 months ago by Doadin (previous) (diff)

comment:12 Changed 18 months ago by Cas

Could you create a separate ticket for the GTKUI limit issue, that is probably related to code refactoring.

comment:14 Changed 18 months ago by Cas

  • Resolution set to Fixed
  • Status changed from reopened to closed

Fixed the issue causing the recent apply_settings exception: [6bd3c6fa88b]

For reference also made some changes to layout for GTKUI Tabs [eea3cb0553e77] The forum is a better place to discuss layout changes/improvement etc..

Note: See TracTickets for help on using tickets.