> -----Original Message----- > From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] > On Behalf Of Eduardo > Sent: 18 July 2011 14:12 > To: sqlalchemy > Subject: [sqlalchemy] Re: information about filed create_engine > > I dont get any log. The access strings from the local and wsgi > applications are identical so the script should connect to the same > database. I encountered problems with create_engine. What type of > exception can this method throw? > The application catches: TypeError, ValueError and OperationalError. > Is there any other Error or some universal sqlalchemy error that can > indicate me where the problem is? > Thanks >
I'm sorry - I still don't understand your setup. How do you know that you've "encountered problems with create_engine" if you're not getting any kind of exception from it? If you really think that create_engine is failing but the exception is being caught silently, why not change your code so that you've got an exception handler around create_engine: try: engine = create_engine(your_connection_string) except Exception, e: import traceback log_file = open('/tmp/sqlalchemy_errors', 'w+') log_file.write('Exception from create_engine\n') log_file.write('%s\n' % e) log_file.write(traceback.format_exc()) raise But your life would be much easier if you learnt how to configure SQLAlchemy's built-in logging features: http://www.sqlalchemy.org/docs/core/engines.html#configuring-logging What WSGI server and web framework are you using (if any)? It sounds like they are hampering your efforts to debug this. You might find it easier to run a very simple wsgi server such as the one in the wsgiref module: http://docs.python.org/library/wsgiref.html#module-wsgiref.simple_server Simon -- 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.