powa-team / powa

PostgreSQL Workload Analyzer
http://powa.readthedocs.io/
PostgreSQL License
764 stars 57 forks source link

Uncaught exception #44

Closed trourance closed 9 years ago

trourance commented 9 years ago

When I try to display the detail of a query, I get the following error displayed in the console:

[E 150316 16:21:23 web:1447] 500 GET /metrics/database/granulaoperate/query/2001890490/indexes?from=2015-03-16+15%3A21%3A21%2B0100&to=2015-03-16+16%3A21%3A21%2B0100 (192.168.150.102) 342.92ms [E 150316 16:21:23 web:1064] Uncaught exception GET /metrics/database/granulaoperate/query/2001890490/explains?from=2015-03-16+15%3A21%3A21%2B0100&to=2015-03-16+16%3A21%3A21%2B0100 (192.168.150.102) HTTPRequest(protocol='http', host='raspberry:13000', method='GET', uri='/metrics/database/granulaoperate/query/2001890490/explains?from=2015-03-16+15%3A21%3A21%2B0100&to=2015-03-16+16%3A21%3A21%2B0100', version='HTTP/1.1', remoteip='192.168.150.102', body='', headers={'Accept-Language': 'fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3', 'Accept-Encoding': 'gzip, deflate', 'Host': 'raspberry:13000', 'Accept': '/_', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0', 'Dnt': '1', 'Connection': 'keep-alive', 'X-Requested-With': 'XMLHttpRequest', 'Referer': 'http://raspberry:13000/database/granulaoperate/query/2001890490/overview/', 'Cookie': '_flashes="Ti4=|1426519281|b78dae36cc50a8bdc0e0ea04ad2df939e137a0a4"; username="cG93YQ==|1426519061|d293b9cde1433385aa49be0d23c0b8fa930078d3"; password="cG93YQ==|1426519061|b4d4c9b5137ba9acb143d11462bdcdb0e57638f8"; server="eDFkZXY=|1426519061|5ec64ccad06d42f6487b15c015ed8e22dfa4874f"'}) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 1021, in _execute getattr(self, self.request.method.lower())(_args, *_kwargs) File "/home/pi/powa-web-2.0.1/powa/query.py", line 223, in get query = format_jumbled_query(row['query'], vals['constants']) TypeError: string indices must be integers, not str

Btw, I get an error when it tries to load the widgets at the end of the page. capture du 2015-03-16 16 25 00

rdunklau commented 9 years ago

Could you please give us the exact version used for:

Thank you

trourance commented 9 years ago

Of course.

Python 2.7.3 python-tornado 2.3-2 python-psycopg2 2.4.5-1 python-sqlalchemy 0.7.8-1 postgresql-9.4 9.4.1-1

rdunklau commented 9 years ago

psycopg2 does not convert json before the 2.5 release. A fix has been added when using those versions, and a new release (2.0.5) has been released.

Thank you for reporting this bug !

trourance commented 9 years ago

Thank you for the support.

Unfortunately, I get a new error with the version 2.0.5. I've opened a new issue on github.

Regards

2015-03-17 10:45 GMT+01:00 Ronan Dunklau notifications@github.com:

psycopg2 does not convert json before the 2.5 release. A fix has been added when using those versions, and a new release (2.0.5) has been released.

Thank you for reporting this bug !

— Reply to this email directly or view it on GitHub https://github.com/dalibo/powa/issues/44#issuecomment-82248949.