Opened 5 years ago

Last modified 2 years ago

#3286 new bug

Error setting some config values from console ('str' object has no attribute 'decode')

Reported by: paulo Owned by:
Priority: minor Milestone: needs verified
Component: Unknown Version: 2.0.3
Keywords: Cc:

Description

deluge-console "config -s download_location /tmp"
 'str' object has no attribute 'decode'
15:43:24 [ERROR   ][deluge.ui.console.cmdline.command                     :138 ] 'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/command.py", line 135, in exec_command
    ret = self._commands[options.command].handle(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 104, in handle
    return self._set_config(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 143, in _set_config
    val = simple_eval(val)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 72, in simple_eval
    res = atom(src, next(src))
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 57, in atom
    return token[-1].decode('string-escape')
AttributeError: 'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/command.py", line 135, in exec_command
    ret = self._commands[options.command].handle(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 104, in handle
    return self._set_config(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 143, in _set_config
    val = simple_eval(val)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 72, in simple_eval
    res = atom(src, next(src))
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 57, in atom
    return token[-1].decode('string-escape')
AttributeError: 'str' object has no attribute 'decode'

Deluge 2.0.3
libtorrent 1.1.5
Python 3.6.8

Change History (2)

comment:1 by ChaCha, 2 years ago

Same here while trying to set any string config key.

Debian 11 Deluge 2.0.3-3.1 Deluge-console 2.0.3-3.1 Python 3.9.2

MyUser@localhost:/# deluge-console -U MyUser -P MyPassword config -s move_completed_path /test/
 'str' object has no attribute 'decode'
18:26:07 [ERROR   ][deluge.ui.console.cmdline.command                     :138 ] 'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/command.py", line 135, in exec_command
    ret = self._commands[options.command].handle(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 104, in handle
    return self._set_config(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 143, in _set_config
    val = simple_eval(val)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 72, in simple_eval
    res = atom(src, next(src))
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 57, in atom
    return token[-1].decode('string-escape')
AttributeError: 'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/command.py", line 135, in exec_command
    ret = self._commands[options.command].handle(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 104, in handle
    return self._set_config(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 143, in _set_config
    val = simple_eval(val)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 72, in simple_eval
    res = atom(src, next(src))
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 57, in atom
    return token[-1].decode('string-escape')
AttributeError: 'str' object has no attribute 'decode'

comment:2 by ChaCha, 2 years ago

Same here while trying to set any string config key.

Debian 11 Deluge 2.0.3-3.1 Deluge-console 2.0.3-3.1 Python 3.9.2

MyUser@localhost:/# deluge-console -U MyUser -P MyPassword config -s move_completed_path /test/
 'str' object has no attribute 'decode'
18:26:07 [ERROR   ][deluge.ui.console.cmdline.command                     :138 ] 'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/command.py", line 135, in exec_command
    ret = self._commands[options.command].handle(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 104, in handle
    return self._set_config(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 143, in _set_config
    val = simple_eval(val)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 72, in simple_eval
    res = atom(src, next(src))
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 57, in atom
    return token[-1].decode('string-escape')
AttributeError: 'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/command.py", line 135, in exec_command
    ret = self._commands[options.command].handle(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 104, in handle
    return self._set_config(options)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 143, in _set_config
    val = simple_eval(val)
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 72, in simple_eval
    res = atom(src, next(src))
  File "/usr/lib/python3/dist-packages/deluge/ui/console/cmdline/commands/config.py", line 57, in atom
    return token[-1].decode('string-escape')
AttributeError: 'str' object has no attribute 'decode'
Note: See TracTickets for help on using tickets.