[DB-SIG] [jpaint@real.com: Re: [ViewCVS] cvsdb problems - AttributeError: Timestamp]

Greg Stein gstein@lyra.org
Fri, 16 Jun 2000 00:36:08 -0700


Comments?

Does MySQLdb *require* mxDateTime?

Cheers,
-g

----- Forwarded message from Jay Painter <jpaint@real.com> -----

Date: Thu, 15 Jun 2000 21:26:10 -0700 (PDT)
From: Jay Painter <jpaint@real.com>
To: Gabriel Belinsky <gabe@belinsky.org>
cc: viewcvs@lyra.org
Subject: Re: [ViewCVS] cvsdb problems - AttributeError: Timestamp

Ug.  According to the DBI 2.0 spec, those functions are suppose to be
required, and MySQLdb should be suppling it's own versions if mxDateTime
isn't installed.  Bummer.  I'll have to impliment fallbacks.

---
Jay Painter <jpaint@real.com> // RealNetworks, Inc.

On Thu, 15 Jun 2000, Gabriel Belinsky wrote:

> I just ran into this starting with fresh installs of Python 1.52,
> MySQL 3.22.32, MySQLdb 0.2.1 and ViewCVS 0.5.
> 
> I found this in the MySQLdb docs:
> file: MySQLdb-0.2.1/doc/MySQLdb-1.html
> 
> 	1.4 DateTime 
> 
> 	If you have the DateTime module installed (recommended), MySQLdb
> 	will use it for date-related objects. Otherwise, these will be
> 	returned to Python as strings. You can also modify the type
> 	conversion dictionaries to return these as other object classes,
> 	if you prefer.
> 
> The correct pointer the the DateTime module is:
> http://starship.python.net/~lemburg/mxDateTime.html
> 
> In fact, without that library MySQLdb 0.2.1 doesn't implement the Timestamp
> method.
> 
> gabe.
> 
> 
> Jay Painter jpaint@real.com
> Fri, 9 Jun 2000 16:00:43 -0700 (PDT) 
> 
> I've seen this error -- I wonder what's going on, the DBI 2.0 API
> specificly requires the Timestamp method.  Can you do a import MySQLdb;
> dir(MySQLdb) and send me the results?
> 
> I'll probably have to download the newest MySQLdb and compile it.  The
> 1.12 version I have used on multiple machines works.
> 
> ---
> Jay Painter <jpaint@real.com> // RealNetworks, Inc.
> 
> On Fri, 9 Jun 2000, Ford, Toby wrote:
> 
> > 
> > I noticed that someone else had the same
> > problem as I in the archive but no resolution was
> > listed.
> > 
> > [root@tford11 viewcvs]# ./cvsdbadmin rebuild /home/cvsroot
> > [/home/cvsroot/CVSROOT/loginfo,v[1 commits]]
> > Traceback (innermost last):
> >   File "./cvsdbadmin", line 156, in ?
> >     commandFunction()
> >   File "./cvsdbadmin", line 123, in CommandRebuild
> >     RecurseRebuild(db, repository, repository)
> >   File "./cvsdbadmin", line 111, in RecurseRebuild
> >     RecurseRebuild(db, repository, path)
> >   File "./cvsdbadmin", line 116, in RecurseRebuild
> >     RebuildFile(db, repository, path)
> >   File "./cvsdbadmin", line 97, in RebuildFile
> >     db.AddCommit(commit)
> >   File "/opt/viewcvs/lib/database.py", line 242, in AddCommit
> >     dbCI_When = DBI.Timestamp(
> > AttributeError: Timestamp
> > [root@tford11 viewcvs]# python
> > Python 1.5.2 (#1, Feb  1 2000, 16:32:16)  [GCC egcs-2.91.66 19990314/Linux
> > (egcs
> > - on linux-i386
> > Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> > >>> import MySQLdb
> > >>> MySQLdb.__version__
> > '1.24'
> > >>> 
> > [root@tford11 viewcvs]# mysqlshow -p":-)" ViewCVS
> > Database: ViewCVS
> > +--------------+
> > |    Tables    |
> > +--------------+
> > | branches     |
> > | checkins     |
> > | descs        |
> > | dirs         |
> > | files        |
> > | people       |
> > | repositories |
> > | tags         |
> > +--------------+
> > [root@tford11 viewcvs]# mysql --version
> > mysql  Ver 10.4 Distrib 3.23.14-alpha, for pc-linux-gnu (i686)
> > 
> > 
> > Toby Ford
> > USi
> > 
> > _______________________________________________
> > viewcvs mailing list
> > viewcvs@lyra.org
> > http://mailman.lyra.org/mailman/listinfo/viewcvs
> >
> 
> _______________________________________________
> viewcvs mailing list
> viewcvs@lyra.org
> http://mailman.lyra.org/mailman/listinfo/viewcvs
> 


_______________________________________________
viewcvs mailing list
viewcvs@lyra.org
http://mailman.lyra.org/mailman/listinfo/viewcvs

----- End forwarded message -----

-- 
Greg Stein, http://www.lyra.org/