wiki:Python Flask Gotchas Import Database Module Fails

Python Flask Gotchas Import Database Module Fails

Tags: Python Flask Gotchas_Category

Problem

It fails with a cannot access database error in the log when it processes the first request after restarting Apache, but subsequent requests cause an database module not found error.

Solution

This could actually be an error that the application does not have access to the database.

Error: Macro BackLinks(None) failed
'Environment' object has no attribute 'get_db_cnx'

Last modified 6 years ago Last modified on 07/21/16 09:06:31
Note: See TracWiki for help on using the wiki.