Skip site navigation (1) Skip section navigation (2)

Re: after application close MS Visual C++ runtime library error occurs

From: Jason Erickson <jason(dot)erickson(at)stickpeople(dot)com>
To: Peter Irbizon <peterirbizon(at)gmail(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: after application close MS Visual C++ runtime library error occurs
Date: 2012-01-11 21:03:59
Message-ID: CAFpJua2k9L5BKfV1W1Dgxv4=b4cKHMn5sLuHUMjehF5+TjaXNw@mail.gmail.com (view raw or flat)
Thread:
Lists: psycopg
A few quick questions, then I can try and duplicate the issue:

* What Windows version are you running the program on (ie, XP, Windows 7)
and what architecture (x86, x64)?
* What Python GUI framework are you using (and version)?
* What Python version & architecture?
* Are the self.cur.close() and self.con.close() calls inside the __del__()
method of your object (ie, are they being called when the object is
destroyed, or do you have a method in your object such as 'close' that
closes the connections when the button is pressed?
* Are you including/using SSL in your code, via psycopg (by using the
sslmode parameter on the connection), and/or by using https in httplib, or
including ssl?
* Any other nonstandard lib modules being imported in your code?


-jason


On Wed, Jan 11, 2012 at 7:21 AM, Peter Irbizon <peterirbizon(at)gmail(dot)com>wrote:

> Hello, I am using psycopg2 in windows app for example:
> import psycopg2
> import psycopg2.extras
> self.con = psycopg2.connect("dbname= host= user= password= port=");
> self.cur = self.con.cursor(cursor_factory=psycopg2.extras.DictCursor)
>
> SELECT = "select something"
> self.cur.execute(SELECT)
>
> for row in self.cur:
>  ...
>
> self.cur.close()
> self.con.close()
>
> But when I click on exit button in application MS Visual C++ runtime
> library error occurs: This application has requested the runtime to
> terminate it in unusual way.
> What am I doing wrong?
>

In response to

Responses

psycopg by date

Next:From: Peter IrbizonDate: 2012-01-12 00:43:35
Subject: Re: after application close MS Visual C++ runtime library error occurs
Previous:From: Peter IrbizonDate: 2012-01-11 14:21:09
Subject: after application close MS Visual C++ runtime library error occurs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group