Opened 5 months ago

Closed 5 months ago

#26026 closed defect (fixed)

ValueError: "blue" isn't a valid color - color_interface is not working

Reported by: cypherpunks Owned by: atagar
Priority: Medium Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Nyx Version: Tor: 0.3.2.10
Severity: Normal Keywords: color blue
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Hi,

I came across an error while editing my configuration file for nyx.
When I choose the color "blue" as shown on the NYX-configuration page as an exsample, the error ""blue" isn't a valid color" is recived.

In fact none of the colors for "color_interface" work.

Configuration file /home/<user>/.nyx/config/nyxrc

graph_stat bandwidth
graph_bound tight
max_graph_width 200
show_interpreter false
connection_rate 10
#acs_support true
color_override blue
#color_interface false

Error from python3

Traceback (most recent call last):
  File "/usr/local/bin/nyx", line 11, in <module>
    load_entry_point('nyx==2.0.4.dev0', 'console_scripts', 'nyx')()
  File "/usr/local/lib/python3.5/dist-packages/nyx-2.0.4.dev0-py3.5.egg/nyx/__init__.py", line 176, in main
    nyx.starter.main()
  File "/usr/local/lib/python3.5/dist-packages/stem-1.6.0-py3.5.egg/stem/util/conf.py", line 289, in wrapped
    return func(*args, config = config, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/nyx-2.0.4.dev0-py3.5.egg/nyx/starter.py", line 75, in main
    config.load(args.config)
  File "/usr/local/lib/python3.5/dist-packages/stem-1.6.0-py3.5.egg/stem/util/conf.py", line 503, in load
    self.load(os.path.join(root, filename))
  File "/usr/local/lib/python3.5/dist-packages/stem-1.6.0-py3.5.egg/stem/util/conf.py", line 526, in load
    self.set(key, value.strip(), False)
  File "/usr/local/lib/python3.5/dist-packages/stem-1.6.0-py3.5.egg/stem/util/conf.py", line 654, in set
    listener(self, key)
  File "/usr/local/lib/python3.5/dist-packages/stem-1.6.0-py3.5.egg/stem/util/conf.py", line 190, in update
    interceptor_value = self.interceptor(key, new_value)
  File "/usr/local/lib/python3.5/dist-packages/nyx-2.0.4.dev0-py3.5.egg/nyx/curses.py", line 173, in conf_handler
    raise ValueError('"%s" isn\'t a valid color' % value)
ValueError: "blue" isn't a valid color

Best regards and thanks for the good work.

Stephan

Child Tickets

Change History (1)

comment:1 Changed 5 months ago by atagar

Resolution: fixed
Status: newclosed

Thanks cypherpunks, great catch! Fixed. You can sidestep this bug by providing a camelcase color name 'color_override Blue').

Note: See TracTickets for help on using tickets.