[Zope-ZEO] import problem

Jim Fulton jim@digicool.com
Mon, 24 Jul 2000 16:12:02 -0400


"Júlio Dinis Silva" wrote:
> 
> Hi all,
> 
> when I try to import a folder with more than 500 objects (images) into zodb
> using a zeo client I get this error:

Dang. 

In ClientCache.py, please change:


    def checkSize(self, size):
        # Make sure we aren't going to exceed the target size.
        # If we are, then flip the cache.
        if self._pos+size > self._limit:
            current=not current
            self._current=current
            self._f[current]=open(self._p[current],'w+b')
            self._f[current].write(magic)
            self._pos=pos=4
        
to:


    def checkSize(self, size):
        # Make sure we aren't going to exceed the target size.
        # If we are, then flip the cache.
        if self._pos+size > self._limit:
            current=not self._current
            self._current=current
            self._f[current]=open(self._p[current],'w+b')
            self._f[current].write(magic)
            self._pos=pos=4
        
and please let me know if this corrects the
problem.

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.org    

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.