How do I use web2py on Heroku?
It may be a problem with the DB setup. By default web2py only supports sqlite or Google App Engine (GAE). It's probably trying to initialize sqlite databases on Heroku's read-only filesystem.
Either disable the DB code temporarily to see if this is indeed the case, or configure a connection to a supported database (MySQL, S3, etc).
I'm having a lot of trouble with getting web2py to work on Heroku. I can't even get a basic app to work. Whenever I go to my herokuapp page, it says

Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details."