Page 1 of 1

Re: Remote Add (base64 issue)

Posted: Mon Apr 06, 2009 5:32 pm
by DarkFlare
Hi

I am trying to remotely add a torrent to the web ui in the new version of Deluge 1.1.5r. In version 5.x i can do this fine however when trying exactly the same method it fails with this message:

Code: Select all

error:global name 'base64' is not defined--------------------Traceback (most recent call last):  File "/var/lib/python-support/python2.5/deluge/ui/webui/page_decorators.py", line 153, in deco    print func(self, name) #remote  File "/var/lib/python-support/python2.5/deluge/ui/webui/pages.py", line 372, in POST    data_b64 = base64.b64encode(vars.torrent.file.read())NameError: global name 'base64' is not defined
I downloaded the source code and had a read, and it appears that there is an error in the source regarding the base64 componant that is only run on a remote curl. The data i am providing is as follows:

Im sending a POST of a multipart form with the following piece of data
a standard filebody called torrent
a standard stringbody called pwd

and im posting it to /remote/torrent/add

As i said this method works in version 0.5x but im not sure why it isnt working in the newer version.

Any insight would be greatly appreciated

Alec

Re: Remote Add (base64 issue)

Posted: Mon Apr 06, 2009 6:40 pm
by andar
I've hopefully fixed this in svn.. Should be in the next version.

Re: Remote Add (base64 issue)

Posted: Mon Apr 06, 2009 8:25 pm
by DarkFlare
Good to hear,

May I ask as to when your next release is scheduled? I'm writing an application that interfaces with deluge and a vague eta would really help me with project management.

Thank you for your rapid work!!!

Alec

Re: Remote Add (base64 issue)

Posted: Mon Apr 06, 2009 8:34 pm
by andar
Hopefully within a few hours..

Re: Remote Add (base64 issue)

Posted: Wed Apr 08, 2009 7:51 pm
by DarkFlare
Hi my apologies for the late reply

And Im impressed with your update time!

however I received this error:

Code: Select all

error:--------------------Traceback (most recent call last):  
File "/var/lib/python-support/python2.5/deluge/ui/webui/page_decorators.py", line 165, in deco    print func(self, name) #remote  File "/var/lib/python-support/python2.5/deluge/ui/webui/pages.py", line 387, in POST    proxy.add_torrent_filecontent(torrent_name, data_b64)  
File "/var/lib/python-support/python2.5/deluge/xmlrpclib.py", line 1150, in __call__    return self.__send(self.__name, args)  
File "/var/lib/python-support/python2.5/deluge/xmlrpclib.py", line 1440, in __request    verbose=self.__verbose  File "/var/lib/python-support/python2.5/deluge/ui/client.py", line 93, in request    return self._parse_response(h.getfile(), sock)  
File "/var/lib/python-support/python2.5/deluge/xmlrpclib.py", line 1343, in _parse_response    return u.close()  
File "/var/lib/python-support/python2.5/deluge/xmlrpclib.py", line 787, in close    raise Fault(**self._stack[0])Fault: <Fault 1: '<type \'exceptions.Exception\'>:method "add_torrent_filecontent" is not supported'>
and erm.. Ive no idea what cause the error this time, sorry =(