List Info

Thread: What to do when changing SQLite version?




What to do when changing SQLite version?
user name
2007-01-04 05:02:08
I have an old tracker that I want to migrate upwards (from
0.6.8 to
1.3.2). There is a fair amount of information on upgrading
on the
roundup pages, but it deals with how to upgrade from certain
roundup
versions to newer ones....
My problem now is that the old tracker uses SQLite at a
version thta
may be as low as 0.5 (how can I check the sqlite version?).
It also
used Pyton 2.1 or 2.2.

What can I do to load the same version of roundup as was
used when the
tracker was installed but with a later version of pysqlite
and still
make it work?
What I am trying to do is to make the old tracker work with
Python
2.4.1 so that I can then try to upgrade it to a later
version.

I installed roundup 0.6.x into Python 2.4.1 and also the
oldest
pysqlite I could find (1.0.1) for Python 2.4.
I have tried wit pysqlite1.1.7 but then I am getting a
database
version error when I try to use roundup.

With 1.0.1 I am getting further but when I start up the
tracker and
log in I get this exception and a traceback:

Templating Error

exceptions.ValueError: day of year out of range

Debugging information follows

   1. In python expression
"i.activity.pretty('%Y-%m-%d')"
   2. While evaluating the expression on line 54

The traceback ends with:

File "<string>", line 2, in f
  File
"C:ProgramsPythonlibsite-packagesroundupcgitempl
ating.py", line
1100, in pretty
    return self._value.pretty(format)
  File
"C:ProgramsPythonlibsite-packagesroundupdate.py&q
uot;, line
302, in pretty
    str = time.strftime(format, (self.year, self.month,
self.day,
ValueError: day of year out of range

Seems like some problems concerning the dates (from the
database???).

If the problem is sqlite, then what can I do to update the
tracker
database to a later sqlite version?



------------------------------------------------------------
-------------
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
_______________________________________________
Roundup-users mailing list
Roundup-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/roundup-u
sers
What to do when changing SQLite version?
user name
2007-01-04 05:14:00
On 04/01/2007, at 4:02 PM, Bo Berglund wrote:
> I have an old tracker that I want to migrate upwards
(from 0.6.8 to
> 1.3.2). There is a fair amount of information on
upgrading on the
> roundup pages, but it deals with how to upgrade from
certain roundup
> versions to newer ones....
> My problem now is that the old tracker uses SQLite at a
version thta
> may be as low as 0.5 (how can I check the sqlite
version?). It also
> used Pyton 2.1 or 2.2.

I've just done a quick search for sqlite version migration  
information and found nothing. This might mean there's
nothing to do,  
or it might mean I'm not looking in the right places. You
might want  
to poke around the sqlite website yourself.

Upgrading python versions makes no difference unless you're
using the  
anydbm backend.


> The traceback ends with:
>
> File "<string>", line 2, in f
>   File
>
"C:ProgramsPythonlibsite-packagesroundupcgitempl
ating.py", line
> 1100, in pretty
>     return self._value.pretty(format)
>   File
"C:ProgramsPythonlibsite-packagesroundupdate.py&q
uot;, line
> 302, in pretty
>     str = time.strftime(format, (self.year, self.month,
self.day,
> ValueError: day of year out of range
>
> Seems like some problems concerning the dates (from the
database???).

Nope, it's a Python 2.4 problem. Replace the pretty method
in roundup/ 
date.py with the code from the most recent version:

     def pretty(self, format='%d %B %Y'):
         ''' print up the date date using a pretty format...

             Note that if the day is zero, and the day
appears first  
in the
             format, then the day number will be removed
from output.
         '''
         # Python2.4 strftime() enforces the non-zero-ness
of the day- 
of-year
         # component of the time tuple, so we need to figure
it out
         t = (self.year, self.month, self.day, self.hour,
self.minute,
             int(self.second), 0, 0, 0)
         t = calendar.timegm(t)
         t = time.gmtime(t)
         str = time.strftime(format, t)

         # handle zero day by removing it
         if format.startswith('%d') and str[0] == '0':
             return ' ' + str[1:]
         return str


     Richard


------------------------------------------------------------
-------------
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
_______________________________________________
Roundup-users mailing list
Roundup-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/roundup-u
sers
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )