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 > > super(OracleExecutionContext, self).pre_exec(engine, proxy, > > compiled, parameters) > > File "c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg > > \sqlalchemy\engine\default.py", line 128, in pre_exec > > self._process_defaults(engine, proxy, compiled, parameters) > > File "c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg > > \sqlalchemy\engine\default.py", line 204, in _process_defaults > > elif not param.has_key(c.key) or param[c.key] is None: > > File "c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg > > \sqlalchemy\sql.py", line 321, in __getitem__ > > v = self.binds[key].typeprocess(v, self.dialect) > > File "c:\python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg > > \sqlalchemy\sql.py", line 836, in typeprocess > > return self.type.dialect_impl(dialect).convert_bind_param(value, > > dialect) > > File "C:\Python24\lib\site-packages\sqlalchemy-0.3.4-py2.4.egg > > \sqlalchemy\databases\oracle.py", line 67, in convert_bind_param > > return ''.join(["%.2X" % ord(c) for c in value]) > > TypeError: iteration over non-sequence --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---