Issue 971300
Created on 2004-06-11 17:20 by gregsf, last changed 2004-06-11 17:20 by gregsf.
msg1303 |
Author: [hidden] (gregsf) |
Date: 2004-06-11 17:20 |
|
While experimenting with the roundup 0.7 mysql problems
I also tried upgrading to the recently released
mysql-python 1.0.0
Looks like they changed Date handling to use the python
2.3 datetime package (which also breaks some of my
other python DB stuff :-( ). Concatenating a string and
a mysql date doesn't work any longer. Either % or str()
must be used to remain portable.
roundup throws the exception below:
ValueError: Unknown spec datetime.datetime(2004, 6, 3,
7, 26, 13) Python 2.3+
/usr/bin/python
A problem occurred while running a Python script. Here
is the sequence of function calls leading up to the
error, with the most recent (innermost) call first. The
exception attributes are:
__doc__ = 'Inappropriate argument value (of
correct type).'
__getitem__ = <bound method
ValueError.__getitem__ of <exceptions.ValueError instance>>
__init__ = <bound method ValueError.__init__ of
<exceptions.ValueError instance>>
__module__ = 'exceptions'
__str__ = <bound method ValueError.__str__ of
<exceptions.ValueError instance>>
args = ('Unknown spec datetime.datetime(2004, 6,
3, 7, 26, 13)',)
/usr/local/lib/python2.3/site-packages/roundup/date.py
in __init__(self=<Date instance>,
spec=datetime.datetime(2004, 6, 3, 7, 26, 13),
offset=0, add_granularity=0)
133 self.second = self.second + frac
134 except:
135 raise ValueError, 'Unknown spec %r'%spec
global ValueError = undefined, spec =
datetime.datetime(2004, 6, 3, 7, 26, 13)
136
137
usagespec='[yyyy]-[mm]-[dd].[H]H:MM[:SS.SSS][offset]'
/usr/local/lib/python2.3/site-packages/roundup/backends/back_mysql.py
in add_new_columns_v2(self=<myroundsql 0x4053ecac>)
264 prop = properties[name]
265 if isinstance(prop, Date) and
v is not None:
266 v = date.Date(v)
v = datetime.datetime(2004, 6, 3, 7, 26, 13),
global date = <module 'roundup.date' from
'/usr/local/lib/python2.3/site-packages/roundup/date.py'>,
global Date = <class roundup.hyperdb.Date>
267 elif isinstance(prop,
Interval) and v is not None:
268 v = date.Interval(v)
/usr/local/lib/python2.3/site-packages/roundup/backends/rdbms_common.py
in upgrade_db(self=<myroundsql 0x4053ecac>)
208 # version 1 didn't have the actor
column (note that in
209 # MySQL this will also transition the
tables to typed columns)
210 self.add_new_columns_v2()
self = <myroundsql 0x4053ecac>, global
add_new_columns_v2 = undefined
211
212 # version 1 doesn't have the OTK,
session and indexing in the
/usr/local/lib/python2.3/site-packages/roundup/backends/rdbms_common.py
in post_init(self=<myroundsql 0x4053ecac>)
157 attribute actually matches the schema
in the database.
158 '''
159 save = self.upgrade_db()
save = undefined, self = <myroundsql 0x4053ecac>,
global upgrade_db = undefined
160
161 # now detect changes in the schema
/home/gs/xxx/qj3/dbinit.py in open(name='admin')
193
194 # schema is set up - run any post-initialisation
195 db.post_init()
db = <myroundsql 0x4053ecac>, global post_init =
undefined
196 return db
197
/usr/local/lib/python2.3/site-packages/roundup/cgi/client.py
in opendb(self=<_roundup_tracker_1.interfaces.Client
instance>, user='admin')
674 if hasattr(self, 'db'):
675 self.db.close()
676 self.db = self.instance.open(user)
self = <_roundup_tracker_1.interfaces.Client
instance>, global db = undefined, global instance =
undefined, global open = undefined, user = 'admin'
677
678 def standard_message(self, to, subject, body,
author=None):
/usr/local/lib/python2.3/site-packages/roundup/cgi/client.py
in
determine_context(self=<_roundup_tracker_1.interfaces.Client
instance>, dre=<_sre.SRE_Pattern object>)
404
405 # we need the db for further context
stuff - open it as admin
406 self.opendb('admin')
self = <_roundup_tracker_1.interfaces.Client
instance>, global opendb = undefined
407
408 # see if we got a designator
/usr/local/lib/python2.3/site-packages/roundup/cgi/client.py
in
inner_main(self=<_roundup_tracker_1.interfaces.Client
instance>)
251 except:
252 # everything else
253 self.write(cgitb.html())
self = <_roundup_tracker_1.interfaces.Client
instance>, global write = undefined, global cgitb =
<module 'roundup.cgi.cgitb' from
'/usr/local/lib/python2.3/site-packages/roundup/cgi/cgitb.py'>,
html = undefined
254
255 def clean_sessions(self):
|
|
Date |
User |
Action |
Args |
2004-06-11 17:20:03 | gregsf | create | |
|