error connecting with 1.7.0

38 views
Skip to first unread message

Mike Lowe

unread,
Feb 25, 2010, 11:24:35 AM2/25/10
to sqlpython
After upgrading to 1.7.0 I started getting the following error on
connect, any hints?

Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/threading.py", line 522, in __bootstrap_inner
self.run()
File "/Library/Python/2.6/site-packages/sqlpython-1.7.0-py2.6.egg/
sqlpython/connections.py", line 276, in run
newgerald = gerald_classes[self.db_instance.rdbms]
(self.db_instance.username, self.db_instance.conn_data.gerald_uri())
File "/Library/Python/2.6/site-packages/gerald-0.3.6-py2.6.egg/
gerald/schema.py", line 95, in __init__
self.connect(connection_string)
File "/Library/Python/2.6/site-packages/gerald-0.3.6-py2.6.egg/
gerald/schema.py", line 101, in connect
self._db = get_connection(connection_string)
File "/Library/Python/2.6/site-packages/gerald-0.3.6-py2.6.egg/
gerald/utilities/dburi.py", line 184, in get_connection
connection = helpers[scheme](connection_string)
File "/Library/Python/2.6/site-packages/gerald-0.3.6-py2.6.egg/
gerald/utilities/dburi.py", line 111, in __init__
self.connection = db.connect(connection_string)

DatabaseError: ORA-12514: TNS:listener does not currently know of
service requested in connect descriptor

Catherine Devlin

unread,
Mar 3, 2010, 4:07:41 PM3/3/10
to Mike Lowe, sqlpython
Hi, Mike!  I'm sorry, I didn't see the Google groups notification that your message was sitting in the moderation queue.  Thanks for reporting the problem.

OK, so... sqlpython is sending a connect string through cx_Oracle that includes an Oracle service name that your target listener doesn't recognize.  Can you do this for me?

1. Verify that the problem hasn't magically disappeared with 1.7.1 (released today)
2. Paste in the string that you used calling 'connect'

If I can't figure it out from those, I may ask you for your tnsnames.ora, but just the connect string might let me figure it out...

Thanks!
--
- Catherine
http://catherinedevlin.blogspot.com/
*** PyCon * Feb 17-25, 2010 * Atlanta, GA * us.pycon.org ***

Mike Lowe

unread,
Mar 3, 2010, 4:15:15 PM3/3/10
to sqlpython
I picked up the 1.7.1 release this morning and I still have this
problem, but I appreciate the other fixes.

Here is a little more, some names have been changed to protect the
guilty but aside from the '--oracle' switch it did not produce any
errors with the 1.6 series:

myclient:~ myusername$ sqlpython
/bin/sh: xclip: command not found
/usr/bin/vim
SQL.No_Connection> connect --oracle dbu...@db.host.name/dbname
Password:
0:iursa@IURSA> Exception in thread Thread-1:


Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/threading.py", line 522, in __bootstrap_inner
self.run()

File "/Library/Python/2.6/site-packages/sqlpython-1.7.1-py2.6.egg/
sqlpython/connections.py", line 277, in run


newgerald = gerald_classes[self.db_instance.rdbms]
(self.db_instance.username, self.db_instance.conn_data.gerald_uri())
File "/Library/Python/2.6/site-packages/gerald-0.3.6-py2.6.egg/
gerald/schema.py", line 95, in __init__
self.connect(connection_string)
File "/Library/Python/2.6/site-packages/gerald-0.3.6-py2.6.egg/
gerald/schema.py", line 101, in connect
self._db = get_connection(connection_string)
File "/Library/Python/2.6/site-packages/gerald-0.3.6-py2.6.egg/
gerald/utilities/dburi.py", line 184, in get_connection
connection = helpers[scheme](connection_string)
File "/Library/Python/2.6/site-packages/gerald-0.3.6-py2.6.egg/
gerald/utilities/dburi.py", line 111, in __init__
self.connection = db.connect(connection_string)
DatabaseError: ORA-12514: TNS:listener does not currently know of
service requested in connect descriptor


On Mar 3, 4:07 pm, Catherine Devlin <catherine.dev...@gmail.com>
wrote:


> Hi, Mike!  I'm sorry, I didn't see the Google groups notification that your
> message was sitting in the moderation queue.  Thanks for reporting the
> problem.
>
> OK, so... sqlpython is sending a connect string through cx_Oracle that
> includes an Oracle service name that your target listener doesn't
> recognize.  Can you do this for me?
>
> 1. Verify that the problem hasn't magically disappeared with 1.7.1 (released
> today)
> 2. Paste in the string that you used calling 'connect'
>
> If I can't figure it out from those, I may ask you for your tnsnames.ora,
> but just the connect string might let me figure it out...
>
> Thanks!
>

> - Catherinehttp://catherinedevlin.blogspot.com/

Pavol Lisy

unread,
Mar 4, 2010, 4:53:13 AM3/4/10
to sqlp...@googlegroups.com
You could probably try (in python not in sqlpython) this for checking
if problem is not outside sqlpython:

import cx_Oracle
import getpass
orapass = getpass.getpass('Password: ')
cx_Oracle.connect(dbuser, orapass, cx_Oracle.makedsn(db.host.name, 1521, dbname)

2010/3/3, Mike Lowe <j.micha...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "sqlpython" group.
> To post to this group, send email to sqlp...@googlegroups.com.
> To unsubscribe from this group, send email to
> sqlpython+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sqlpython?hl=en.
>
>

Catherine Devlin

unread,
Mar 4, 2010, 12:38:52 PM3/4/10
to sqlp...@googlegroups.com

Yup, that's a bug, all right.  I thought I'd fix it last night, but it's still being difficult.

For now, I think you can work around by leaving out the --oracle (it's the default anyway).  The 1.7.1 do_connect help has a few connect syntax examples known to work.

Thanks!
--
- Catherine

Mike Lowe

unread,
Mar 4, 2010, 3:23:33 PM3/4/10
to sqlpython
Leaving out the --oracle doesn't seem to do it, using form
oracle://username:passwd@dsn does work

On Mar 4, 12:38 pm, Catherine Devlin <catherine.dev...@gmail.com>
wrote:

> - Catherinehttp://catherinedevlin.blogspot.com/

Reply all
Reply to author
Forward
0 new messages