AttributeError: 'float' object has no attribute 'replace'

Issue #1 on hold
created an issue

This only should affect sqlite with it's poor type checking on columns. Small bug - looks like values are always being passed to cgi.escape, even if not a string. Easiest may be to always convert to string? not sure if there would be any performance impact.

{{{ Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/gevent-0.13.0-py2.6-linux-i686.egg/gevent/", line 109, in handle File "/data/sites/htsql/src/htsql/", line 83, in call body = wsgi(environ, start_response) File "/data/sites/htsql/src/htsql/", line 44, in call status, headers, body = request.render(environ) File "/data/sites/htsql/src/htsql/", line 156, in render return renderer.render(product) File "/data/sites/htsql/src/htsql/fmt/", line 30, in render body = list(self.generate_body(product)) File "/data/sites/htsql/src/htsql/fmt/", line 77, in generate_body for chunk in self.serialize_html(product): File "/data/sites/htsql/src/htsql/fmt/", line 90, in serialize_html for chunk in self.serialize_body(product): File "/data/sites/htsql/src/htsql/fmt/", line 151, in serialize_body for chunk in self.serialize_content(product): File "/data/sites/htsql/src/htsql/fmt/", line 202, in serialize_content output = format(value) File "/data/sites/htsql/src/htsql/fmt/", line 267, in call return cgi.escape(value) File "/usr/lib/python2.6/", line 1035, in escape s = s.replace("&", "&amp;") # Must be done first! AttributeError: 'float' object has no attribute 'replace' <WSGIServer fileno=3 address=>: Failed to handle request: request = <http_request "GET /zoning.limit(50) HTTP/1.1"> application = <htsql.application.Application object at 0xb714a90c> }}}

Comments (4)

  1. Log in to comment