deluge-console not passing username and password

General support for problems installing or using Deluge
Post Reply
Abbott
Member
Member
Posts: 13
Joined: Tue Nov 19, 2013 8:11 am

deluge-console not passing username and password

Post by Abbott »

Hi,

I am writing a python program that will use deluge-console, but I can't get it to interact with the daemon running on the local machine. I can connect fine with `deluge-console "connect localhost username password"`, but if I try to send the info command, the log tells me that I am sending a blank username and password and that I fail to authenticate:

Code: Select all

deluge@debian:~$ deluge-console info
[ERROR   ] 03:00:59 client:391 RPCError Message Received!
--------------------------------------------------------------------------------
RPCRequest: daemon.login(, )
--------------------------------------------------------------------------------
  File "/usr/lib/python2.7/dist-packages/deluge/core/rpcserver.py", line 260, in dispatch
    ret = component.get("AuthManager").authorize(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/deluge/core/authmanager.py", line 87, in authorize
    raise BadLoginError("Username does not exist")

BadLoginError: Username does not exist
--------------------------------------------------------------------------------
Failed to connect to 127.0.0.1:58846 with reason: Username does not exist
deluge@debian:~$
I have also tried running both commands on the same line separated by a ";", but that didn't work either. The root user properly sends username "localclient" and a long string for a password, but my user doesn't send anything.

Is there something I have to do to get my user to send authentication info? If there is no way to change that, how can I stay connected to send info?
Cas
Top Bloke
Top Bloke
Posts: 3679
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: deluge-console not passing username and password

Post by Cas »

Code: Select all

deluge-console "connect host user pass; info"
Abbott
Member
Member
Posts: 13
Joined: Tue Nov 19, 2013 8:11 am

Re: deluge-console not passing username and password

Post by Abbott »

Cas wrote:

Code: Select all

deluge-console "connect host user pass; info"
This worked! I am running into encoding problems though. I got this error:

Code: Select all

Error getting torrent info: [Failure instance: Traceback: <type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xc2 in position 43: ordinal not in range(128)
/usr/local/lib/python2.7/dist-packages/twisted/protocols/policies.py:120:dataReceived
/usr/lib/python2.7/dist-packages/deluge/ui/client.py:179:dataReceived
/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py:393:callback
/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py:501:_startRunCallbacks
--- <exception caught here> ---
/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py:588:_runCallbacks
/usr/lib/python2.7/dist-packages/deluge/ui/console/commands/info.py:154:on_torrents_status
/usr/lib/python2.7/dist-packages/deluge/ui/console/commands/info.py:188:show_info
/usr/lib/python2.7/dist-packages/deluge/ui/console/main.py:292:write
]
It looks like deluge-console couldn't print out the unicode character "·" that was in the title of the torrent. Is there something I need to do to get unicode to work? It looks like someone opened a ticket a while ago here but that it was resolved 6 years ago. I am using:

deluge 1.3.10
twisted 16.1.1

EDIT:

Sorry, the problem was related to my python2.7 default encoding settings. I found a related answer on SO here to anyone else having the problem. Thanks again.
Post Reply