error attempting to edit service: ValueError: Expected string. Got <type 'list'>

48 views
Skip to first unread message

arthur sherman

unread,
Mar 24, 2016, 6:18:05 PM3/24/16
to adagios
when attempting to edit the http service, configure->service->http->use->src-pnp->save changes, i get:

i'm using adagios 1.6.1, nagios 4.1.1, debian 8 (jessie) . looks like something very deep in python code.  any hints?

when i try the edit via configure->service->http->geek edit (edit it ',srv-pnp)->save changes, i get:
'Warning! fatal: Not a git repository (or any of the parent directories): .git'

i didn't try editing each and every service yet, so i don't know which (hopefully none) errors are awaiting me there.
tnx,
ams


ValueError: Expected string. Got <type 'list'>

If you think this is a bug. Send the following information to the developers:

Traceback (most recent call last):
  File "/opt/adagios/adagios/views.py", line 43, in wrapper
    result = view_func(request, *args, **kwargs)
  File "/opt/adagios/adagios/objectbrowser/views.py", line 219, in edit_object
    return _edit_service(request, c)
  File "/usr/local/lib/python2.7/dist-packages/pynag/Utils/decorators.py", line 35, in wrap
    return func(*args, **kwargs)
  File "/opt/adagios/adagios/objectbrowser/views.py", line 325, in _edit_service
    return render_to_response('edit_service.html', c, context_instance=RequestContext(request))
  File "/usr/lib/python2.7/dist-packages/django/shortcuts.py", line 25, in render_to_response
    return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
  File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 178, in render_to_string
    return t.render(context_instance)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 148, in render
    return self._render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 142, in _render
    return self.nodelist.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.7/dist-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 126, in render
    return compiled_parent._render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 142, in _render
    return self.nodelist.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.7/dist-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 126, in render
    return compiled_parent._render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 142, in _render
    return self.nodelist.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.7/dist-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 126, in render
    return compiled_parent._render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 142, in _render
    return self.nodelist.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.7/dist-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 65, in render
    result = block.nodelist.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.7/dist-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 65, in render
    result = block.nodelist.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.7/dist-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 312, in render
    return nodelist.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.7/dist-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/loader_tags.py", line 150, in render
    return template.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 148, in render
    return self._render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 142, in _render
    return self.nodelist.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.7/dist-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/defaulttags.py", line 312, in render
    return nodelist.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.7/dist-packages/django/template/debug.py", line 80, in render_node
    return node.render(context)
  File "/usr/lib/python2.7/dist-packages/django/template/debug.py", line 93, in render
    output = force_text(output)
  File "/usr/lib/python2.7/dist-packages/django/utils/encoding.py", line 85, in force_text
    s = six.text_type(s)
  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 508, in __str__
    return self.as_widget()
  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 560, in as_widget
    return force_text(widget.render(name, self.value(), attrs=attrs))
  File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 603, in value
    return self.field.prepare_value(data)
  File "/opt/adagios/adagios/objectbrowser/forms.py", line 174, in prepare_value
    raise ValueError("Expected string. Got %s" % type(value))
ValueError: Expected string. Got <type 'list'>

arthur sherman

unread,
Apr 13, 2016, 3:36:24 PM4/13/16
to adagios
fixed.
the solution was setting the locale to us utf. it had been BG utf.
-ams
Reply all
Reply to author
Forward
0 new messages