Issue with enabling NUT-UPS

In attempting to start NUT UPS i receive the following traceback. I am not sure why it is occurring.

   Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/smart_manager/views/nut_service.py", line 41, in post
    self._switch_nut(command, self._get_config(service))
  File "/opt/rockstor/src/rockstor/smart_manager/views/base_service.py", line 40, in _get_config
    return json.loads(service.config)
  File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer

@djevo1 Could you give the settings you are trying to use for the NUT UPS system and the UPS model you are using them with, cheers?

Maybe a screen shot of the NUT config page so we can see what settings are triggering this response.

Also note the official docs reference for these settings:
UPS / NUT Setup

@djevo1 As I am currently working on the NUT config code and have managed to reproduce your error. At least in my reproduction there is also a more user friendly header message that reads:

Houston, we've had a problem.
Failed to start NUT-UPS service due to a system error. Check the service is configured correctly via it's spanner icon.

ie and a screen grab:

It is the expected outcome of attempting to enable the service prior to configuring it.

Does this reflect your experience or had you already entered a configuration, if so it would be useful to see what configuration lead to the same message so that we might ‘trouble shoot’ it?

This is what I get after the service is configured

Traceback (most recent call last):
  File "/opt/rockstor/src/rockstor/smart_manager/views/nut_service.py", line 41, in post
self._switch_nut(command, self._get_config(service))
  File "/opt/rockstor/src/rockstor/smart_manager/views/nut_service.py", line 64, in _switch_nut
systemctl('nut-server', 'start')
  File "/opt/rockstor/src/rockstor/system/services.py", line 63, in systemctl
return run_command([SYSTEMCTL_BIN, switch, service_name])
  File "/opt/rockstor/src/rockstor/system/osi.py", line 98, in run_command
raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = ['/usr/bin/systemctl', 'start', 'nut-server']. rc = 1. stdout = ['']. stderr = ["A dependency job for nut-server.service failed. See 'journalctl -xe' for details.", '']