Problems getting SQLPython to run

Skip to first unread message

Andy Todd

Oct 1, 2009, 7:17:23 AM10/1/09
to SQL Python, Catherine Devlin

I'm trying to run SQLPython from a Mercurial checkout on my Ubuntu
virtual machine. I've followed the instructions on to install
from the development and everything seems to install and set up
correctly. But when I try and run SQLPython I get an exception;

andy47@ubuntu-db:~/Work/src/sqlpython$ sqlpython andy47/********
/bin/sh: xclip: not found
DeprecationWarning: the sets module is deprecated
import inspect, itertools, new, operator, sets, sys, warnings, weakref

MySqlPy V1.6.3 - 'sqlplus in python'
Rev: 1.6.3, 30-Mar-09

Companion of SqlPython, a python module that reproduces Oracle's command
line within python
and sqlpyPlus. Major contributions by Catherine Devlin,

Usage: sqlpython [connect string] [single-word command] ["multi-word

Quick start command list:

- top -> executes a query to list all active sessions in (Oracle 10g
and RAC)
(use: instance activity monitoring, a DBA tool)
- tselect -> prints the result set in trasposed form, useful to print
result sets with
many columns such as dba_ or v$ views (ex: dba_tables or
- py -> execute a python command (C.D.)
- db -> quick connect using credentials in pass.txt file
(Ex: write username and pass in pass.txt and then "db
db_alias" to connect)
- sql -> prints the sql text from the cache. parameter: sql_id of
the statement
(Ex: sql fzqa1qj65nagki)
- explain -> prints the execution plan from the cache. parameter: sql_id
of the statement
- sessinfo-> prints session information. 1 parameter sid (Ex: sql 101
print info for sid 101)
- longops -> prints from gv$session_longops (running full scans, etc)
- load -> prints the OS load on all cluster nodes (10g RAC)
- sleect,slect -> alias for select (I mistyped select this way too many
- top9i -> 9i (and single instance) version of top
- describe, @, !, spool, show, set, list, get, write -> sql*plus-like,
from sqlpyPlus (C.D.)
- shortcuts: \c (connect), \d (describe), etc, from sqlpyPlus (C.D.)
- :myvarname = xx, set autobind 1, print -> bind variables management
extension, to sqlplus (C.D.)

SQL> connect username@dbalias or username/pass@dbalias
SQL> select sysdate from dual;
SQL> exit

Traceback (most recent call last):
File "/usr/local/bin/sqlpython", line 8, in <module>
load_entry_point('sqlpython==1.7.0', 'console_scripts', 'sqlpython')()
File "/mnt/hgfs/andy47_mac/Work/src/sqlpython/sqlpython/",
line 196, in run
line 93, in newFunc
"/mnt/hgfs/andy47_mac/Work/src/sqlpython/sqlpython/", line
148, in do_connect
except sqlalchemy.exc.ArgumentError, e:
AttributeError: 'module' object has no attribute 'exc'

Any ideas what I am doing wrong?

From the desk of Andrew J Todd esq -

Reply all
Reply to author
0 new messages