[sqlalchemy] Re: Adding a BLOB column to my Oracle database breaks my app

2007-02-15 Thread shday

This fixed the problem. I guess the 4k limit on the BLOB size will
still force me to store my files outside the database for now. I need
to store mostly Word and Excel files... which tend to be a tad longer
than 4k, even when they're empty!

Steve

On Feb 15, 10:17 am, Michael Bayer [EMAIL PROTECTED] wrote:
 im guessing its a value of None that I forgot to check for.  try rev.
 2321.  also you will definitely need to use the trunk for BLOBs in
 oracle since the PrefetchingResultProxy fix is only in the trunk.

 On Feb 14, 2:02 pm, shday [EMAIL PROTECTED] wrote:

  I've been using an Oracle database and reflection (i.e.,
  autoload=True). I recently added a BLOB column to the database. I
  never did any modification to the Python application code yet. The
  application was made using Turbogears and it just serves two forms,
  one for inserting records and one for updating . I am still able to
  update records, but when I do an insert I get the error below. I tried
  the latest oracle.py (r2303) and get the same thing (I couldn't do an
  svn checkout of everything because of our companies firewall).

  Page handler: bound method Root.insertrequest of
  srt.controllers.Root object at 0x0180EDB0
  Traceback (most recent call last):
File c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy
  \_cphttptools.py, line 105, in _run
  self.main()
File c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy
  \_cphttptools.py, line 254, in main
  body = page_handler(*virtual_path, **self.params)
File string, line 3, in insertrequest
File c:\python24\lib\site-packages\turbogears-1.0.1-py2.4.egg
  \turbogears\controllers.py, line 334, in expose
  output = database.run_with_transaction(
File string, line 5, in run_with_transaction
File c:\python24\lib\site-packages\turbogears-1.0.1-py2.4.egg
  \turbogears\database.py, line 347, in sa_rwt
  retval = dispatch_exception(e,args,kw)
File c:\python24\lib\site-packages\turbogears-1.0.1-py2.4.egg
  \turbogears\database.py, line 345, in sa_rwt
  transaction.commit()
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\session.py, line 54, in commit
  self.session.flush()
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\session.py, line 220, in flush
  self.uow.flush(self, objects)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\unitofwork.py, line 194, in flush
  flush_context.execute()
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\unitofwork.py, line 333, in execute
  head.execute(self)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\unitofwork.py, line 470, in execute
  UOWExecutor().execute(trans, self)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\unitofwork.py, line 793, in execute
  self.execute_save_steps(trans, task)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\unitofwork.py, line 815, in execute_save_steps
  self.execute_childtasks(trans, task, False)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\unitofwork.py, line 841, in execute_childtasks
  self.execute(trans, child, isdelete)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\unitofwork.py, line 793, in execute
  self.execute_save_steps(trans, task)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\unitofwork.py, line 810, in execute_save_steps
  self.save_objects(trans, task)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\unitofwork.py, line 798, in save_objects
  task._save_objects(trans)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\unitofwork.py, line 461, in _save_objects
  self.mapper.save_obj(self.polymorphic_tosave_objects, trans)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\orm\mapper.py, line 998, in save_obj
  c = connection.execute(statement, params)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\engine\base.py, line 258, in execute
  return Connection.executors[type(object).__mro__[-2]](self,
  object, *multiparams, **params)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\engine\base.py, line 282, in execute_clauseelement
  return self.execute_compiled(elem.compile(engine=self.__engine,
  parameters=param), *multiparams, **params)
File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\engine\base.py, line 297, in execute_compiled
  context.pre_exec(self.__engine, proxy, compiled, parameters)
File C:\Python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
  \sqlalchemy\databases\oracle.py, line 152, in pre_exec
  

[sqlalchemy] Re: Adding a BLOB column to my Oracle database breaks my app

2007-02-15 Thread shday

With rev. 2321 of oracle.py I'm getting the error below  when I do the
following:

sr =
session.query(StudyRequest).selectfirst(study_request_table.c.study_request_id
== request_id)

With 3.4 I don't get and error.

Note that I'm only using oracle.py from the trunk, everything else is
3.4

Traceback (most recent call last):
  File console, line 1, in ?
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\orm\
query.py, line 214, in selectfirst
ret = self.select_whereclause(*args, **params)
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\orm\
query.py, line 252, in select_whereclause
return self._select_statement(statement, params=params)
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\orm\
query.py, line 378, in _select_statement
return self.execute(statement, params=params, **kwargs)
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\orm\
query.py, line 308, in execute
result = self.session.execute(self.mapper, clauseelement,
params=params)
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\orm\
session.py, line 133, in execute
return self.connection(mapper,
close_with_result=True).execute(clause, param
s, **kwargs)
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\engi
ne\base.py, line 258, in execute
return Connection.executors[type(object).__mro__[-2]](self,
object, *multipa
rams, **params)
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\engi
ne\base.py, line 282, in execute_clauseelement
return self.execute_compiled(elem.compile(engine=self.__engine,
parameters=p
aram), *multiparams, **params)
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\sql.
py, line 511, in compile
compiler.compile()
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\sql.
py, line 392, in compile
self.statement.accept_visitor(self)
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\sql.
py, line 1607, in accept_visitor
self.order_by_clause.accept_visitor(visitor)
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\sql.
py, line 915, in accept_visitor
c.accept_visitor(visitor)
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\sql.
py, line 1259, in accept_visitor
visitor.visit_column(self)
  File C:\Python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\data
bases\oracle.py, line 378, in visit_column
  File c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg
\sqlalchemy\ansi
sql.py, line 218, in visit_column
n = self.dialect.oid_column_name()
TypeError: oid_column_name() takes exactly 2 arguments (1 given)





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---



[sqlalchemy] Re: Adding a BLOB column to my Oracle database breaks my app

2007-02-15 Thread Michael Bayer


On Feb 15, 2007, at 12:21 PM, shday wrote:


 With rev. 2321 of oracle.py I'm getting the error below  when I do the
 following:

 sr =
 session.query(StudyRequest).selectfirst 
 (study_request_table.c.study_request_id
 == request_id)

 With 3.4 I don't get and error.

 Note that I'm only using oracle.py from the trunk, everything else is
 3.4

indeed... do you need me to tell you that that method signature has  
changed since 0.3.4 ?  :)

(it has)





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~--~~~~--~~--~--~---