471,337 Members | 907 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

[python-list] Problem with SQLObject

I'm creating one aplicattion and I use SQLObject, but I have a little
problem, when I try to create one table my aplicattion crash! :(
Let me show you:

nercof@debian:~/Proyectos/ghhp/lib$ python
Python 2.4.4 (#2, Apr 5 2007, 20:11:18)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>from sqlobject import *
from connection import conn
class User(SQLObject):
.... _connection = conn
.... user_name = StringCol(length=14, unique=True)
.... un_pass = StringCol(length=10)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/sqlobject/main.py", line 1332,
in createTable
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py",
line 528, in createTable
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py",
line 307, in query
return self._runWithConnection(self._query, s)
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py",
line 219, in _runWithConnection
conn = self.getConnection()
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py",
line 230, in getConnection
conn = self.makeConnection()
line 51, in makeConnection
db=self.db, user=self.user, passwd=self.password, **self.kw)
File "/usr/lib/python2.4/site-packages/MySQLdb/__init__.py", line 75,
in Connect
return Connection(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line
164, in __init__
super(Connection, self).__init__(*args, **kwargs2)
TypeError: an integer is required
I can't find the mistake.
First I thought that not create correctly the conection to mysql, but
testening show me this:
<sqlobject.mysql.mysqlconnection.MySQLConnection instance at 0xb784df8c>
Saw it seems that it works.
Please cant you help me.
Thank's and regards

| Heizenreder Guillermo
| http://gheize.wordpress.com/
| http://code.google.com/u/gheize/
| http://tipslinux.blogspot.com/

Oct 26 '07 #1
0 1105

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Olaf Meyer | last post: by
5 posts views Thread by paolo veronelli | last post: by
1 post views Thread by Sean | last post: by
4 posts views Thread by Edmond Rusjan | last post: by
reply views Thread by Anthony Baxter | last post: by
reply views Thread by Anthony Baxter | last post: by
3 posts views Thread by Saravanan | last post: by
9 posts views Thread by John Dean | last post: by
reply views Thread by Kurt B. Kaiser | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.