Opened 17 years ago
Closed 15 years ago
#755 closed bug (Fixed)
Can't set listen_ports through console UI
| Reported by: | florian@wagner-flo.net | Owned by: | Calum |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.3.2 |
| Component: | Console UI | Version: | 1.3.1 |
| Keywords: | Cc: |
Description
>>> config ... * listen_ports: [6881, 6891] ...
This suggests the following to work, which it doesn't.
>>> config -s listen_ports [10000, 10010] * malformed expression ([)
Trying a tuple instead of a list is also a no-go.
>>> config -s listen_ports (10000, 10000) * Configuration value provided has incorrect type.
Neither does leaving the comma and/or parentheses off.
>>> config -s listen_ports 10000, 10010 * bogus data after expression >>> config -s listen_ports 10000 10010 * bogus data after expression >>> config -s listen_ports (10000 10010) * Configuration value provided has incorrect type.
Change History (8)
comment:1 by , 17 years ago
| Milestone: | 1.1.1 |
|---|
comment:2 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
This is fixed in 1.2.
{{
config listen_ports
listen_ports: (6881, 6891)
config -s listen_ports (10000,10010)
Configuration value successfully updated.
- ConfigValueChanged: listen_ports: (10000, 10010)
listen_ports: (10000, 10010)config listen_ports
}}
comment:3 by , 16 years ago
>>> config listen_ports listen_ports: (6881, 6891) >>> config -s listen_ports [10000,10010] malformed expression ([) >>> config -s listen_ports (10000,10010) Configuration value successfully updated. * ConfigValueChanged: listen_ports: (10000, 10010) >>> config listen_ports listen_ports: (10000, 10010)
comment:4 by , 16 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
| Version: | 1.1.0 → 1.3.1 |
This seems to be back in 1.3.1:
>>> config -s listen_ports (10111, 10222)
could not convert string to float: (10111, 10222)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.1-py2.7-linux-i686.egg/deluge/ui/console/main.py", line 320, in do_command
ret = self._commands[cmd].handle(*args, **options.__dict__)
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.1-py2.7-linux-i686.egg/deluge/ui/console/commands/config.py", line 98, in handle
return self._set_config(*args, **options)
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.1-py2.7-linux-i686.egg/deluge/ui/console/commands/config.py", line 134, in _set_config
val = simple_eval(options["set"][1] + " " + " ".join(args))
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.1-py2.7-linux-i686.egg/deluge/ui/console/commands/config.py", line 81, in simple_eval
res = atom(src.next, src.next())
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.1-py2.7-linux-i686.egg/deluge/ui/console/commands/config.py", line 56, in atom
out.append(atom(next, token))
File "/usr/local/lib/python2.7/site-packages/deluge-1.3.1-py2.7-linux-i686.egg/deluge/ui/console/commands/config.py", line 65, in atom
return float(token[-1])
ValueError: could not convert string to float: (10111, 10222)
comment:5 by , 15 years ago
Well,
this could probably be resolved by changing line 65 in config.py from float type conversion:
return float(token[-1])
to some other conversion. I had a similar problem and after switching to a string type conversion
return str(token[-1])
it worked.
comment:6 by , 15 years ago
| Component: | other → console |
|---|---|
| Milestone: | → 1.3.2 |
| Priority: | major → minor |
I think that the issue was caused by line 69 being changed between 1.2.3 to 1.3
I looked into this a while ago and found this was the change to revert.
- return token[-1].decode("string-escape")
+ return token[1][1:-1].decode("string-escape")
I am putting this here simply for reference as I found that Sian's suggested fix also works.
comment:7 by , 15 years ago
| Owner: | changed from to |
|---|---|
| Status: | reopened → accepted |



Milestone 1.1.1 deleted