Hello!

On Sat, Feb 24, 2007 at 12:44:42AM +0100, Dr. Markus Gritsch wrote:
> the following simple script fails to run when using SQLObject 0.8.0.
> It works fine when using SQLObject 0.7.3.
> 
> ---
> 
> from sqlobject import *
> 
> sqlhub.processConnection = connectionForURI('mysql://[EMAIL PROTECTED]/test')

   Can you set the debugging flag

sqlhub.processConnection = connectionForURI('mysql://[EMAIL 
PROTECTED]/test?debug=1')

   and show the entire output?

> class Person(SQLObject):
>    name = StringCol()
> 
> class Shortcut(SQLObject):
>    person = ForeignKey('Person')
> 
> Person.dropTable(ifExists=True)
> Person.createTable(ifNotExists=True)
> 
> Shortcut.dropTable(ifExists=True)
> Shortcut.createTable(ifNotExists=True)
> 
> ---
> 
> Traceback (most recent call last):
>  File "0.8.py", line 15, in <module>
>    Shortcut.createTable(ifNotExists=True)
>  File 
>  "c:\python25\lib\site-packages\sqlobject-0.8.0-py2.5.egg\sqlobject\main.py",
> line 1394, in createTable
>    conn.query(constraint)
>  File 
>  
> "c:\python25\lib\site-packages\sqlobject-0.8.0-py2.5.egg\sqlobject\dbconnection.py",
> line 316, in query
>    return self._runWithConnection(self._query, s)
>  File 
>  
> "c:\python25\lib\site-packages\sqlobject-0.8.0-py2.5.egg\sqlobject\dbconnection.py",
> line 230, in _runWithConnection
>    val = meth(conn, *args)
>  File 
>  
> "c:\python25\lib\site-packages\sqlobject-0.8.0-py2.5.egg\sqlobject\dbconnection.py",
> line 313, in _query
>    self._executeRetry(conn, conn.cursor(), s)
>  File 
>  
> "c:\python25\lib\site-packages\sqlobject-0.8.0-py2.5.egg\sqlobject\mysql\mysqlconnection.py",
> line 109, in _executeRetry
>    raise OperationalError(ErrorMessage(e))
> sqlobject.dberrors.OperationalError: Can't create table
> '.\test\#sql-2b4_b6.frm' (errno: 150)
Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to