Re: POSKeyError with a fresh Zeo Install

"Jimmy small" <[email protected]>
Newsgroups gmane.comp.web.zope.database
Message-ID <[email protected]>
Thanks for your answers Tim!

That was very helpful.

-Jimmy

On 10/20/06, Tim Peters <[email protected]> wrote:
>
> [Jimmy small]
> > Setup:
> > python 2.3.5
> > Zope 2.8.4-final
>
> It's good to know this, but in this specific case none of the above
> actually matters.
>
> > appropriate python extensions for windows
>
> One of the log messages suggests your ZEO server box should install a
> more-recent pywin32:
>
> > 2006-10-18T14:51:57 WARNING Z2 Can not install signal handlers.  Please
> > install (or upgrade) your pywin32 installation (
> https://sf.net/projects/pywin32)
>
>
> > When I create 1 zope instance and 1 zeo instance, start the zeo and then
> > start the zope instance I see this in my logs.  Note this is the first
> start
> > of the fresh installs.  Does anyone have any suggestions as to the
> cause?
>
> Yes:  this is expected, under all versions of Zope, and is normal,
> with or without ZEO.  Whenever a DB object is created (and at least
> one always must be) to mediate access to your database (Data.fs), the
> first thing it does is load the database "root object".  But when the
> database is initially empty, there /is/ no root object, and that's the
> source of:
>
> > 2006-10-18T14:52:44 INFO ZEO.zrpc.Connection(S) (127.0.0.1:1289)
> loadEx()
> > raised exception: 0x00
> > Traceback (most recent call last):
> > ...
> > "C:\Zope\Zope-2.8.4-final\lib\python\ZODB\FileStorage\FileStorage.py",
> line 514, in _lookup_pos
> >     raise POSKeyError(oid)
> > POSKeyError: 0x00
>
> The object with oid 0 (0x00 above) is the root object, but it doesn't
> initially exist.  The client catches this POSKeyError, and /creates/
> the root object as a result.  On the client side, you're in this part
> of DB.__init__() at the time:
>
>         try:
>             storage.load(z64,'')
>         except KeyError:
>             # Create the database's root in the storage if it doesn't
> exist
>
> So every time you have an empty database, the first time you access it
> you should expect one of these.  It would be nicer if the log message
> were suppressed, but that occurs at a lower level:  by the time the
> KeyError is caught here, the log message has already been generated.
>

_______________________________________________
Zope-DB mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope-db
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.