"bagpipe-looking-glass bgp" results in "error code 500"

Bug #1847605 reported by Thomas Morin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
BaGPipe
New
Undecided
Unassigned

Bug Description

With current master code, but probably some earlier versions as well, we have this:

# bagpipe-looking-glass bgp
Error code 500: A server error occurred. Please contact the administrator.

In bagpipe-bgp logs, we have the following error:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/lib/python2.7/site-packages/pecan/middleware/recursive.py", line 56, in __call__
    return self.application(environ, start_response)
  File "/usr/lib/python2.7/site-packages/pecan/core.py", line 840, in __call__
    return super(Pecan, self).__call__(environ, start_response)
  File "/usr/lib/python2.7/site-packages/pecan/core.py", line 683, in __call__
    self.invoke_controller(controller, args, kwargs, state)
  File "/usr/lib/python2.7/site-packages/pecan/core.py", line 604, in invoke_controller
    result = self.render(template, result)
  File "/usr/lib/python2.7/site-packages/pecan/core.py", line 425, in render
    return renderer.render(template, namespace)
  File "/usr/lib/python2.7/site-packages/pecan/templating.py", line 23, in render
    return encode(namespace)
  File "/usr/lib/python2.7/site-packages/pecan/jsonify.py", line 133, in encode
    return _instance.encode(obj)
  File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python2.7/site-packages/pecan/jsonify.py", line 127, in default
    return jsonify(obj)
  File "/usr/lib/python2.7/site-packages/singledispatch.py", line 210, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
  File "/usr/lib/python2.7/site-packages/pecan/jsonify.py", line 122, in jsonify
    return _default.default(obj)
  File "/usr/lib/python2.7/site-packages/pecan/jsonify.py", line 108, in default
    return JSONEncoder.default(self, obj)
  File "/usr/lib64/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <bound method Manager.get_lg_route_counts of Manager> is not JSON serializable
127.0.0.1 - - [10/Oct/2019 13:01:48] "GET /looking-glass/bgp HTTP/1.1" 500 59

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.