[sqlalchemy] Strange occasional ProgrammingError: Cannot operate on a closed database
Lately, I've been getting the following error quite randomly while developing a web app using sqlite3. I'm not sure how to fix it and it hasn't to me before, but it is leading to occasional failed AJAX requests. ProgrammingError: (ProgrammingError) Cannot operate on a closed database. None [{}] Does anyone else have a similar issue or know how I can avoid it? RHH -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
[sqlalchemy] Re: How do we retrieve the database dialect that a specific session is using?
On Apr 24, 10:00 am, Roy Hyunjin Han starsareblueandfara...@gmail.com wrote: Is there any way to retrieve the database dialect that a specific session is using? e.g. MySQL, PostGIS, etc. I am trying to modify Sanjiv Singh's GeoAlchemy extension so that a person can retrieve the appropriate database procedure for a given dialect, so that geospatial queries can be both direct (performed in a single database call) as well as dialect-neutral. For example, in PostGIS, getting the WKT of a geometry requires func.ST_AsText() session.query(func.ST_AsText(Road.geom)).first() However, in MySQL, the same procedure requires func.AsText() session.query(func.AsText(Road.geom)).first() I would like to be able to create a function called wkt() in both geoalchemy/mysql.py and geoalchemy/postgis.py that enables me to the following: session.query(session.dialect.wkt(Road.geom)).first() Aha found it. Never mind. session.connection().dialect -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
[sqlalchemy] Re: connectionless queries with Spatial data (PostGIS)
On Feb 20, 6:52 pm, Michael Bayer mike...@zzzcomputing.com wrote: Also I've built an ORM extension forpostgiswhich is incomplete but demonstrates how to round trip and createPostGISexpressions in a clean way, thats in the distribution in examples/postgis/postgis.py . Thanks for this contribution, Michael. Will you be at the PyCon SQLAlchemy sprint? I would like to work on getting PostGIS support hardcoded in the trunk. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~--~~~~--~~--~--~---