Re: [SQLObject] Connection errors

2013-10-10 Thread Francisco Chiotta
Thank you for your help, I am going to ask psycopg team about the problem. If I have some news about how to fix it, i will tell you. Cheers. 2013/9/30 Oleg Broytman > On Sat, Sep 28, 2013 at 01:22:26PM +0400, Oleg Broytman > wrote: > >I returned from the vacation. Will test if psycopg w/o

Re: [SQLObject] Connection errors

2013-09-30 Thread Oleg Broytman
On Sat, Sep 28, 2013 at 01:22:26PM +0400, Oleg Broytman wrote: >I returned from the vacation. Will test if psycopg w/o SQLObject > returns the code/error. The following program: from decimal import Decimal import psycopg2 def report_error(e): print e.__class__.__name__, e.pgcode, e.p

Re: [SQLObject] Connection errors

2013-09-28 Thread Oleg Broytman
Hi! On Thu, Sep 26, 2013 at 11:52:08AM -0300, Francisco Chiotta wrote: > It doesn't work for me either. I have installed the psycopg 2.5.1 (the > latest), and I always get None if the authentication fails or the server is > not working in the given IP. I don't know why. > > 2013/9/15 Oleg Broyt

Re: [SQLObject] Connection errors

2013-09-26 Thread Francisco Chiotta
It doesn't work for me either. I have installed the psycopg 2.5.1 (the latest), and I always get None if the authentication fails or the server is not working in the given IP. I don't know why. 2013/9/15 Oleg Broytman > On Fri, Sep 13, 2013 at 11:40:09AM -0300, Francisco Chiotta < > franchio...

Re: [SQLObject] Connection errors

2013-09-15 Thread Oleg Broytman
On Fri, Sep 13, 2013 at 11:40:09AM -0300, Francisco Chiotta wrote: > It would be great. Sure, I can test the results. The patch is attached. The code and error string are available: try: do_something() except OperationalError, e: print e.args[0].code print e.args[0].error Do

Re: [SQLObject] Connection errors

2013-09-13 Thread Oleg Broytman
On Fri, Sep 13, 2013 at 11:40:09AM -0300, Francisco Chiotta wrote: > It would be great. Sure, I can test the results. > > 2013/9/12 Oleg Broytman > >Do you want me to provide e.code for psycopg2? I'll ask you to test > > the result. I will try to do that before taking a vacation next w

Re: [SQLObject] Connection errors

2013-09-13 Thread Francisco Chiotta
It would be great. Sure, I can test the results. Cheers 2013/9/12 Oleg Broytman > On Thu, Sep 12, 2013 at 04:43:09PM -0300, Francisco Chiotta < > franchio...@gmail.com> wrote: > > Ok, I thought that It was possible to recover an error code or something > > like that. > >psycopg2 provides

Re: [SQLObject] Connection errors

2013-09-12 Thread Oleg Broytman
On Thu, Sep 12, 2013 at 04:43:09PM -0300, Francisco Chiotta wrote: > Ok, I thought that It was possible to recover an error code or something > like that. psycopg2 provides some information: http://initd.org/psycopg/docs/module.html#exceptions http://initd.org/psycopg/docs/errorcodes.html#mod

Re: [SQLObject] Connection errors

2013-09-12 Thread Francisco Chiotta
Ok, I thought that It was possible to recover an error code or something like that. Thank you for your help. 2013/9/12 Oleg Broytman > On Thu, Sep 12, 2013 at 03:33:36PM -0300, Francisco Chiotta < > franchio...@gmail.com> wrote: > > Thank you, but I need to distinguish the errors in the except

Re: [SQLObject] Connection errors

2013-09-12 Thread Oleg Broytman
On Thu, Sep 12, 2013 at 03:33:36PM -0300, Francisco Chiotta wrote: > Thank you, but I need to distinguish the errors in the except statement, > something like that: > > try: > connection = connectionForURI('postgres://'+user+':'+password+'@ > '+host+'/'+database?debug=True) > sqlhub.pr

[SQLObject] Connection errors

2013-09-12 Thread Francisco Chiotta
Hello, I have a question related with the connections. I am using the following code for that: try: connection = connectionForURI('postgres://'+user+':'+password+'@ '+host+'/'+database) sqlhub.processConnection = connection connection.query("SELECT 1") except OperationalErro

Re: [SQLObject] Connection errors

2013-09-12 Thread Oleg Broytman
Hi! On Thu, Sep 12, 2013 at 02:07:48PM -0300, Francisco Chiotta wrote: > Hello, > I have a question related with the connections. I am using the > following code for that: > > try: > connection = connectionForURI('postgres://'+user+':'+password+'@ > '+host+'/'+database) > sqlh

Re: [SQLObject] Connection errors

2013-09-12 Thread Francisco Chiotta
Thank you, but I need to distinguish the errors in the except statement, something like that: try: connection = connectionForURI('postgres://'+user+':'+password+'@ '+host+'/'+database?debug=True) sqlhub.processConnection = connection connection.query("SELECT 1") except OperationalEr