Deluge Auth Issue User name does not exist

I’m having an issue with Deluge where it won’t allow me to pass ‘deluge-console’ commands through one of my scripts after torrent completion.

When I launch deluge-console this is the error that is immediately shown:

Failed to connect to with reason: Username does not exist

and this is the error if I run my script manually:

root@DietPi:~/scripts# sh
[ERROR   ] 18:21:10 client:391 RPCError Message Received!
RPCRequest: daemon.login(, )
  File "/usr/lib/python2.7/dist-packages/deluge/core/", line 262, in dispatch
    ret = component.get("AuthManager").authorize(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/deluge/core/", line 89, in authorize
    raise BadLoginError("Username does not exist")

BadLoginError: Username does not exist

I can’t seem to find the auth file anywhere as it’s normally in ~/.config/deluge/auth so I assumed dietpi moved it to dietpi_userdata but I don’t see it there either.

Can anyone tell me what I can do here to get this working?

Also, here is the full script I’m running after a torrent completes:


deluge-console pause $TORRENT_ID
filebot -script fn:amc --output "/mnt/samba" --log-file /root/scripts/amc.log --action move --conflict override -non-strict --def music=y clean=y "movieFormat=Movies/{any{collection}{n+' ('+y+')'}}/{n} {'('+y+')'}{' CD'+pi}"  "ut_dir=$TORRENT_PATH/$TORRENT_NAME" "ut_kind=multi" "ut_title=$TORRENT_NAME" 
deluge-console del $TORRENT_ID
filebot -script fn:cleaner $TORRENT_PATH --log-file /root/scripts/cleaner.log


many thanks for your message. I guess you need to specify configuration directory as follow

deluge-console -c /mnt/dietpi_userdata/deluge/.config/deluge/

Authentication user/pw is stored inside /mnt/dietpi_userdata/deluge/.config/deluge/auth

This way I was able to connect.

That worked ty!

I have another issue after solving that one. Now that the script works on it’s own, I have added it to the execute plugin to run, restarted the deluge services and when a download completes it does not run the script.

I checked /var/log/deluged/daemon.log and this is the error it gives.

[WARNING ] 10:06:26 torrent:330 File priorities were not set for this torrent
[ERROR ] 10:08:45 core:154 [execute] Execute script not found or not executable

I verified the script location is correct and I set the file permissions using chmod 777. What am I missing here? Should I be changing the user access for this file to debian-deluged using chown?

This is all coming about since I updated an old raspberry pi 2 which couldn’t be updated to the new dietpi image and the old scripts all worked without modifying any user properties. So I’m assuming stuff has changed since I set it up 3-4 years ago.

Any insights would be appreciated, ty!

EDIT: I found a bug ticket from deluge from 5 years ago that basically mimics what I’m seeing. No idea where to go from here though.

I’m not a Deluge specialist and I don’t use this application myself. Maybe you can follow up on a Deluge specific board.