Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ORA-01017 error only with qt

50 views
Skip to first unread message

lab...@gmail.com

unread,
Jan 4, 2008, 9:58:50 AM1/4/08
to
Hi,

I'm using the cx_oracle python module to access an oracle database
It works fine but when I run within a qt environment it fails with the
following error:
ORA-01017: invalid username/password; logon denied

The script that works:

import cx_Oracle as Oracle
import qt
sql_query = "SELECT * FROM AC_DATATYPE"
dbUser = ...
dbPassword = ...
dbHostname = ...
dbInstance = ...
dbPort = ...
dbDSN = Oracle.makedsn(dbHostname, int(dbPort), dbInstance)
#### app = qt.QApplication([])
dbConnection =
Oracle.connect(user=dbUser,password=dbPassword,dsn=dbDSN)

The connection fails if the line
#### app = qt.QApplication([])
is uncommented

- It runs on Linux x86_64, with python 2.4, oracle OCI 9.2,
cx_oracle4.1, qt x11 free 3.3.4
- qt is compiled WITHOUT sql drivers
- This works fine (with the qt call) on another linux x86_64 (with
the whole binaries:python,lib oracle,qt, ...)


Any tips ??

thanks

laurent
Toulouse, France

Frank van Bortel

unread,
Jan 4, 2008, 2:21:09 PM1/4/08
to
lab...@gmail.com wrote:
> Hi,
>
> I'm using the cx_oracle python module to access an oracle database
> It works fine but when I run within a qt environment it fails with the
> following error:
> ORA-01017: invalid username/password; logon denied
>
> The script that works:
>
> import cx_Oracle as Oracle
> import qt
> sql_query = "SELECT * FROM AC_DATATYPE"
> dbUser = ...
> dbPassword = ...
> dbHostname = ...
> dbInstance = ...
> dbPort = ...
> dbDSN = Oracle.makedsn(dbHostname, int(dbPort), dbInstance)
> #### app = qt.QApplication([])
> dbConnection =
> Oracle.connect(user=dbUser,password=dbPassword,dsn=dbDSN)
>
> The connection fails if the line
> #### app = qt.QApplication([])
> is uncommented

Not into python, but suspecting processing is serial, try
to reverse the two last lines - you to try to
process something without being logged on - the
Oracle.connect must be doing that if everything works ok
without the app = qt.... line.

--
Regards,
Frank van Bortel

Top-posting is one way to shut me up...

labrach

unread,
Jan 4, 2008, 3:28:19 PM1/4/08
to
thanks but
Unfortunately, this won't fix since the database connection and the
query must be executed from the Qt graphical user interface, that is
to say after the qt application is launched.
The script I've provided is just a simplify part of a big application,
and this application works fine on windows, solaris and even on some
other linux boxes !
bye
laurent

On 4 jan, 20:21, Frank van Bortel <frank.van.bor...@gmail.com> wrote:

labrach

unread,
Jan 8, 2008, 4:13:42 AM1/8/08
to
I reply to myself because I've found the problem:
I've replaced NLS_LANG=ENGLISH with NLS_LANG=
and now it's ok

thanks
laurent

> > Top-posting is one way to shut me up...- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

0 new messages