473,320 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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)
....
>>User.createTable()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/sqlobject/main.py", line 1332,
in createTable
conn.createTable(cls)
File "/usr/lib/python2.4/site-packages/sqlobject/dbconnection.py",
line 528, in createTable
self.query(self.createTableSQL(soClass))
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()
File
"/usr/lib/python2.4/site-packages/sqlobject/mysql/mysqlconnection.py",
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:
>>User._connection
<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 1166

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Olaf Meyer | last post by:
I'm having some problems compiling Python 2.3.3 on HP-UX (B.11.00). I've tried sevral different options for the configure script (e.g. enabling/disabling gcc, aCC) but I always get the same problem...
5
by: paolo veronelli | last post by:
I've a vague idea of the differences,I don't know scheme anyway. I'd like to see an example to show what is missing in python about closures and possibly understand if ruby is better in this...
1
by: Sean | last post by:
Hi, Trying to compile the PythonCE (Validus Medical Systems Python 2.3.4) using eVC++ 4.0 and the Smartphone2003 SDK. Linking is generating 28 errors. I dug into the first one (PyErr_Fetch)...
4
by: Edmond Rusjan | last post by:
Hi All, I'd like to use Python-2.3.4 on OSF1 V4.0, but have trouble installing. With a plain "./configure; make" build, I cannot import socket. If I uncomment the socketmodule in Modules/Setup,...
0
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.3.5 (release candidate 1). Python 2.3.5 is a bug-fix release. See the release...
0
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.3.5 (final). Python 2.3.5 is a bug-fix release. See the release notes at the...
3
by: Saravanan | last post by:
Hello, Im running Python Application as a Windows Service (using windows extensions). But, sporadically the application crashes (crash in Python23.dll) and this stops the service. This...
9
by: John Dean | last post by:
Hi Does anybody know from where I can get a copy of the source for Python V2.4.2. I downloaded what is reckoned to be the source code from www.python.org, but is turns out to be the MacXOS...
11
by: Osiris | last post by:
I have these pieces of C-code (NOT C++ !!) I want to call from Python. I found Boost. I have MS Visual Studio 2005 with C++. is this the idea: I write the following C source file:...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 418 open ( +5) / 3522 closed ( +1) / 3940 total ( +6) Bugs : 959 open (+13) / 6405 closed ( +5) / 7364 total (+18) RFE : 250 open...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.