this is most likely a typing error and id need to see the types of columns being used. in particular if you have any "String" columns without a size, they are now interpreted as CLOBs which might be where its tripping up.
On Mar 27, 2007, at 10:35 AM, shday wrote: > > Here is the surrounding code: > > def model_list(therapeutic_area='All'): > if therapeutic_area == 'All': > s = model_table.select(order_by=[model_table.c.model_acronym]) > elif therapeutic_area == 'Other': > s = > model_table.select(~(model_table.c.therapeutic_area.in_ > ('Respiratory','Diabetes', > > 'Inflammation','CVD')), > order_by=[model_table.c.model_acronym]) > else: > s = > model_table.select > (model_table.c.therapeutic_area==therapeutic_area,order_by= > [model_table.c.model_acronym]) > rs = s.execute() > return [(str(row['model_id']),(row['model_acronym'] +" - > "+row['model_name'])[:80]) for row in rs.fetchall()] > > > On Mar 27, 10:29 am, "shday" <[EMAIL PROTECTED]> wrote: >> I upgraded to 0.3.6 from 0.3.5 and one of my querys stopped working: >> >> s = >> model_table.select(~(model_table.c.therapeutic_area.in_ >> ('Respiratory','Diab etes', >> >> 'Inflammation','CVD')), >> order_by= >> [model_table.c.model_acronym]) >> >> All my other query still work fine. Although this is the only one >> using in_() and "~". >> >> The funny thing is that the created sql appears to be exactly the >> same >> as before. Here is the error: >> >> 2007-03-26 15:11:20,851 INFO sqlalchemy.engine.base.Engine.0x..d0 >> SELECT model.i >> nvestigator_isid, model.active, model.model_id, model.model_acronym, >> model.model >> _name, model.therapeutic_area >> FROM model >> WHERE model.therapeutic_area NOT IN >> (:model_therapeutic_area, :model_therapeutic >> _ar_1, :model_therapeutic_ar_2, :model_therapeutic_ar_3) ORDER BY >> model.model_ac >> ronym >> 2007-03-26 15:11:20,851 sqlalchemy.engine.base.Engine.0x..d0 INFO >> SELECT model.i >> nvestigator_isid, model.active, model.model_id, model.model_acronym, >> model.model >> _name, model.therapeutic_area >> FROM model >> WHERE model.therapeutic_area NOT IN >> (:model_therapeutic_area, :model_therapeutic >> _ar_1, :model_therapeutic_ar_2, :model_therapeutic_ar_3) ORDER BY >> model.model_ac >> ronym >> 2007-03-26 15:11:20,861 INFO sqlalchemy.engine.base.Engine.0x..d0 >> {'model_therap >> eutic_area': 'Respiratory', 'model_therapeutic_ar_3': 'CVD', >> 'model_therapeutic_ >> ar_2': 'Inflammation', 'model_therapeutic_ar_1': 'Diabetes'} >> 2007-03-26 15:11:20,861 sqlalchemy.engine.base.Engine.0x..d0 INFO >> {'model_therap >> eutic_area': 'Respiratory', 'model_therapeutic_ar_3': 'CVD', >> 'model_therapeutic_ >> ar_2': 'Inflammation', 'model_therapeutic_ar_1': 'Diabetes'} >> 2007-03-26 15:11:20,861 INFO sqlalchemy.engine.base.Engine.0x..d0 >> ROLLBACK >> 2007-03-26 15:11:20,861 sqlalchemy.engine.base.Engine.0x..d0 INFO >> ROLLBACK >> Traceback (most recent call last): >> File "C:\Documents and Settings\Daystev\Desktop\srt-trunk\srt- >> project >> \start-sr >> t.py", line 23, in ? >> from srt.controllers import Root >> File "C:\Documents and Settings\Daystev\Desktop\srt-trunk\srt- >> project >> \srt\cont >> rollers.py", line 9, in ? >> model_list = [('Respiratory',[('','Please select a model')] >> +dbmodel.model_li >> st('Respiratory')), >> File "C:\Documents and Settings\Daystev\Desktop\srt-trunk\srt- >> project >> \srt\mode >> l.py", line 158, in model_list >> rs = s.execute() >> File "c:\python24\lib\site-packages\sqlalchemy-0.3.6-py2.4.egg >> \sqlalchemy\sql. >> py", line 776, in execute >> return self.compile(engine=self.engine, >> parameters=compile_params).execute(* >> multiparams, **params) >> File "c:\python24\lib\site-packages\sqlalchemy-0.3.6-py2.4.egg >> \sqlalchemy\sql. >> py", line 669, in execute >> return e.execute_compiled(self, *multiparams, **params) >> File "c:\python24\lib\site-packages\sqlalchemy-0.3.6-py2.4.egg >> \sqlalchemy\engi >> ne\base.py", line 726, in execute_compiled >> return connection.execute_compiled(compiled, *multiparams, >> **params) >> File "c:\python24\lib\site-packages\sqlalchemy-0.3.6-py2.4.egg >> \sqlalchemy\engi >> ne\base.py", line 503, in execute_compiled >> proxy(str(compiled), parameters) >> File "c:\python24\lib\site-packages\sqlalchemy-0.3.6-py2.4.egg >> \sqlalchemy\engi >> ne\base.py", line 499, in proxy >> self._execute_raw(statement, parameters, cursor=cursor, >> context=context) >> File "c:\python24\lib\site-packages\sqlalchemy-0.3.6-py2.4.egg >> \sqlalchemy\engi >> ne\base.py", line 547, in _execute_raw >> self._execute(cursor, statement, parameters, context=context) >> File "c:\python24\lib\site-packages\sqlalchemy-0.3.6-py2.4.egg >> \sqlalchemy\engi >> ne\base.py", line 566, in _execute >> raise exceptions.SQLError(statement, parameters, e) >> sqlalchemy.exceptions.SQLError: (DatabaseError) ORA-01460: >> unimplemented or unre >> asonable conversion requested >> 'SELECT model.investigator_isid, model.active, model.model_id, >> model.model_acro >> nym, model.model_name, model.therapeutic_area \nFROM model \nWHERE >> model.therape >> utic_area NOT IN >> (:model_therapeutic_area, :model_therapeutic_ar_1, :model_thera >> peutic_ar_2, :model_therapeutic_ar_3) ORDER BY >> model.model_acronym' {'model_ther >> apeutic_area': 'Respiratory', 'model_therapeutic_ar_3': 'CVD', >> 'model_therapeuti >> c_ar_2': 'Inflammation', 'model_therapeutic_ar_1': 'Diabetes'} > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---