On 19/04/2012 00:49, Jeroen van Rijn wrote:
On Thu, Apr 19, 2012 at 00:39, Étienne Loks<[email protected]> wrote:+ try: + cursor.execute(query % {'way':'way'}) + except psycopg2.InternalError: + # This exception generaly occurs when inappropriate ways have + # to be cleaned. Using a buffer of 0 generaly helps to clean + # them. This operation is not applied by default for + # performance. + db.rollback() + cursor.execute(query % {'way':'st_buffer(way, 0)'})That's a very quick fix for the GEOS error. Reading through the patch it looks to be that if psycopg2 fails for another reason, however unlikely that might seem, you end up with a runaway process?
Unless I am loosing my Python the exception will raise a second time while executing the query with the buffer without being catch.
Best regards, -- Étienne Loks
