I forgot to thank you for the bug report. Reporting bugs enables us to find and fix them quicker. Also the details here made it easy to reproduce.
On 22. aug. 2017 09:30, Espen Lorentzen wrote:
I recently did a fresh install of nav on Debian Jessie.
Everything is working except geomap, when navigating to http://nav-server/geomap/normal/ i receive an alert via mail with the following information:
Internal Server Error: /geomap/normal/data Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/nav/web/geomap/views.py", line 163, in data
do_fetch_data)
File "/usr/lib/python2.7/dist-packages/nav/web/geomap/views.py", line 210, in get_formatted_data
output = format_data(format_, features)
File "/usr/lib/python2.7/dist-packages/nav/web/geomap/output_formats.py", line 96, in format_data
return formatter(featurelist)
File "/usr/lib/python2.7/dist-packages/nav/web/geomap/output_formats.py", line 45, in make_geojson
return json.dumps(geojson)
File "/usr/lib/python2.7/json/__init__.py", line 243, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python2.7/json/encoder.py", line 184, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <lazy_dict {'color': '#666666', 'popup': {'content': u'<div class="place-popup">\n\n <table class="listtable">\n <tr>\n
<th>Rooms</th>\n <th>IP devices</th>\n <th>CPU load (max)</th>\n </tr>\n <tr>\n <td>1</td>\n <td>1</td>\n <td>unknown</td>\n </tr>\n </table>\n\n \n <table class="listtable">\n <caption>\n <a href="/search/room/MEKU-2ETG-EF-02/"\n target="_blank"\n title="View room information">\n MEKU-2ETG-EF-02\n (Etasjefordeling #2 - MEKU)\n </a>\n </caption>\n\n <tr>\n <td><b>IP Devices:</b> 1</td>\n <td><b>CPU load (max):</b> unknown</td>\n </tr>\n\n <tr>\n <td colspan="2">\n <ul class="large-block-grid-2">\n \n <li>\n <h5>\n <a href="/ipdevinfo/sw-meku-03.net.domain.no/ <http://sw-meku-03.net.domain.no/>"\n target="_blank"\n title="View in IP Device Info">sw-meku-03.net.domain.no <http://sw-meku-03.net.domain.no></a>\n </h5>\n <ul class="no-bullet">\n <li><b>IP:</b>10.10.10.10</li>\n <li><b>Category:</b> SW</li>\n <li><b>Type:</b> Cisco C2960S</li>\n <li><b>Up:</b> y</li>\n <li><b>Load:</b> unknown</li>\n </ul>\n </li>\n \n </ul>\n </td>\n </tr>\n\n </table>\n \n\n</div>\n', 'closable': True, 'id': 'popup-cn[cn[37]]', 'size': [300, 250]}, 'type': 'node', 'size': 4}> is not JSON serializable
I guess there's a step i forgot, but can't figure out what it is.
-- MVH / REGARDS:
Espen Lorentzen esplor@gmail.com mailto:esplor@gmail.com