Re: [ZODB-Dev] DisconnectedError

2007-05-04 Thread Jim Fulton


On May 4, 2007, at 12:36 PM, José Pedro Ferreira wrote:


Yes, the DB did not exist.


OK


And yes, it's not a hack,


It looks like the hack was to open and close the storage with  
FileStorage, rather than ZEO.


But with Python 2.4, you were able to create the database using ZEO.   
Strange.
Presumably I'll be able to reproduce the problem you had with Python  
2.5.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] DisconnectedError

2007-05-04 Thread José Pedro Ferreira
Yes, the DB did not exist. And yes, it's not a hack, it's only opening 
and closing the database... but it unexpectedly works after doing it.


Cheers,

Pedro


On May 4, 2007, at 11:25 AM, José Pedro Ferreira wrote:


Jim Fulton wrote:


I don't know why the client is being disconnected.  As others have 
hinted, you should try this with Python 2.4 -- and please report 
back if that changes the outcome.


OK, I've tested it with Python 2.4.4, and it worked OK. For Python 
2.5, I had to use the hack I posted in the last mail (weird...).


I don't really see a hack.  All you did was open the database as 
usual.  Before you ran your script with the "hack", did you make sure 
the database did not exist?


Jim

--
Jim Fultonmailto:[EMAIL PROTECTED]Python Powered!
CTO (540) 361-1714http://www.python.org
Zope Corporationhttp://www.zope.comhttp://www.zope.org





___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] DisconnectedError

2007-05-04 Thread Jim Fulton


On May 4, 2007, at 11:25 AM, José Pedro Ferreira wrote:


Jim Fulton wrote:


I don't know why the client is being disconnected.  As others have  
hinted, you should try this with Python 2.4 -- and please report  
back if that changes the outcome.


OK, I've tested it with Python 2.4.4, and it worked OK. For Python  
2.5, I had to use the hack I posted in the last mail (weird...).


I don't really see a hack.  All you did was open the database as  
usual.  Before you ran your script with the "hack", did you make sure  
the database did not exist?


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] DisconnectedError

2007-05-04 Thread José Pedro Ferreira

Jim Fulton wrote:


I don't know why the client is being disconnected.  As others have 
hinted, you should try this with Python 2.4 -- and please report back 
if that changes the outcome.


OK, I've tested it with Python 2.4.4, and it worked OK. For Python 2.5, 
I had to use the hack I posted in the last mail (weird...).


Best regards,

Pedro Ferreira
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] DisconnectedError

2007-05-04 Thread José Pedro Ferreira

Gary Poster wrote:

Hi. ZODB does not currently work with Py2.5.

Gary

OK, thanks.
However, I was able to make it work, running this simple script, and 
then running the application again.




#!/usr/bin/python

import ZODB
from ZODB import FileStorage, DB
import transaction

storage = FileStorage.FileStorage("zeo/data.fs")
db = DB(storage)
connection = db.open()
dbroot = connection.root()


transaction.commit()

connection.close()
db.close()
storage.close()



And now it works perfectly :).
Is there any possible explanation for this?

Thanks again,

Pedro
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] DisconnectedError

2007-05-04 Thread Jim Fulton


On May 4, 2007, at 10:39 AM, José Pedro Ferreira wrote:


Hello.
I am experiencing a problem with ZODB-3.6.0 / Python 2.5, under Linux.
Each time I initialize a database, i get a DisconnectedError  
exception in the client, with the following traceback:




 File "/home/pferreir/workspace/indico/code/code/MaKaC/common/ 
db.py", line 50, in __init__

   self._db=MaKaCDB(self._storage)

 File "/usr/local/lib/python2.5/site-packages/ZODB/DB.py", line  
238, in __init__

   storage.load(z64,'')

 File "/usr/local/lib/python2.5/site-packages/ZEO/ 
ClientStorage.py", line 746, in load

   return self.loadEx(oid, version)[:2]

 File "/usr/local/lib/python2.5/site-packages/ZEO/ 
ClientStorage.py", line 769, in loadEx

   data, tid, ver = self._server.loadEx(oid, version)

 File "/usr/local/lib/python2.5/site-packages/ZEO/ServerStub.py",  
line 192, in loadEx

   return self.rpc.call("loadEx", oid, version)

 File "/usr/local/lib/python2.5/site-packages/ZEO/zrpc/ 
connection.py", line 531, in call

   r_flags, r_args = self.wait(msgid)

 File "/usr/local/lib/python2.5/site-packages/ZEO/zrpc/ 
connection.py", line 621, in wait

   raise DisconnectedError()

DisconnectedError



In the server side, I get:



2007-05-04T16:20:36 (11926) new connection ('127.0.0.1', 38126):  


2007-05-04T16:20:36 (127.0.0.1:38126) received handshake 'Z303'
2007-05-04T16:20:36 (127.0.0.1:38126) loadEx() raised exception: 0x00
Traceback (most recent call last):
 File "/usr/local/lib/python2.5/site-packages/ZEO/zrpc/ 
connection.py", line 421, in handle_request

   ret = meth(*args)
 File "/usr/local/lib/python2.5/site-packages/ZEO/ 
StorageServer.py", line 248, in loadEx

   return self.storage.loadEx(oid, version)
 File "/usr/local/lib/python2.5/site-packages/ZODB/FileStorage/ 
FileStorage.py", line 523, in loadEx

   pos = self._lookup_pos(oid)
 File "/usr/local/lib/python2.5/site-packages/ZODB/FileStorage/ 
FileStorage.py", line 514, in _lookup_pos

   raise POSKeyError(oid)
POSKeyError: 0x00
2007-05-04T16:20:36 (11926/127.0.0.1:38126) disconnected
2007-05-04T16:20:36 (11926) new connection ('127.0.0.1', 38127):  


2007-05-04T16:20:36 (127.0.0.1:38127) received handshake 'Z303'



What confuses me is that I though that a root object for the  
database would be created by the client, and a DisconnectedError is  
raised before that happens. What can be happening?


The root object is only created if it doesn't exist.  The database is  
trying to determine if it exists or not.


I don't know why the client is being disconnected.  As others have  
hinted, you should try this with Python 2.4 -- and please report back  
if that changes the outcome.


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] DisconnectedError

2007-05-04 Thread Jim Fulton


On May 4, 2007, at 10:45 AM, Gary Poster wrote:


Hi.  ZODB does not currently work with Py2.5.


I doubt that this has anything to do with his problem. He should try  
with Python 2.4 though.  I'll be interested and depressed if this  
solves his problem .


Jim

--
Jim Fulton  mailto:[EMAIL PROTECTED]Python 
Powered!
CTO (540) 361-1714  
http://www.python.org
Zope Corporationhttp://www.zope.com http://www.zope.org



___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] DisconnectedError

2007-05-04 Thread Gary Poster

Hi.  ZODB does not currently work with Py2.5.

Gary
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] DisconnectedError

2007-05-04 Thread Andreas Jung



--On 4. Mai 2007 16:39:30 +0200 José Pedro Ferreira 
<[EMAIL PROTECTED]> wrote:



Hello.
I am experiencing a problem with ZODB-3.6.0 / Python 2.5, under Linux.


None of the ZODB versions is certified for Python 2.5 so far, perhaps
it's related to the Python version.

-aj

pgpdY7EBYo2U6.pgp
Description: PGP signature
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


[ZODB-Dev] DisconnectedError

2007-05-04 Thread José Pedro Ferreira

Hello.
I am experiencing a problem with ZODB-3.6.0 / Python 2.5, under Linux.
Each time I initialize a database, i get a DisconnectedError exception 
in the client, with the following traceback:




 File "/home/pferreir/workspace/indico/code/code/MaKaC/common/db.py", 
line 50, in __init__

   self._db=MaKaCDB(self._storage)

 File "/usr/local/lib/python2.5/site-packages/ZODB/DB.py", line 238, in 
__init__

   storage.load(z64,'')

 File "/usr/local/lib/python2.5/site-packages/ZEO/ClientStorage.py", 
line 746, in load

   return self.loadEx(oid, version)[:2]

 File "/usr/local/lib/python2.5/site-packages/ZEO/ClientStorage.py", 
line 769, in loadEx

   data, tid, ver = self._server.loadEx(oid, version)

 File "/usr/local/lib/python2.5/site-packages/ZEO/ServerStub.py", line 
192, in loadEx

   return self.rpc.call("loadEx", oid, version)

 File "/usr/local/lib/python2.5/site-packages/ZEO/zrpc/connection.py", 
line 531, in call

   r_flags, r_args = self.wait(msgid)

 File "/usr/local/lib/python2.5/site-packages/ZEO/zrpc/connection.py", 
line 621, in wait

   raise DisconnectedError()

DisconnectedError



In the server side, I get:



2007-05-04T16:20:36 (11926) new connection ('127.0.0.1', 38126): 


2007-05-04T16:20:36 (127.0.0.1:38126) received handshake 'Z303'
2007-05-04T16:20:36 (127.0.0.1:38126) loadEx() raised exception: 0x00
Traceback (most recent call last):
 File "/usr/local/lib/python2.5/site-packages/ZEO/zrpc/connection.py", 
line 421, in handle_request

   ret = meth(*args)
 File "/usr/local/lib/python2.5/site-packages/ZEO/StorageServer.py", 
line 248, in loadEx

   return self.storage.loadEx(oid, version)
 File 
"/usr/local/lib/python2.5/site-packages/ZODB/FileStorage/FileStorage.py", 
line 523, in loadEx

   pos = self._lookup_pos(oid)
 File 
"/usr/local/lib/python2.5/site-packages/ZODB/FileStorage/FileStorage.py", 
line 514, in _lookup_pos

   raise POSKeyError(oid)
POSKeyError: 0x00
2007-05-04T16:20:36 (11926/127.0.0.1:38126) disconnected
2007-05-04T16:20:36 (11926) new connection ('127.0.0.1', 38127): 


2007-05-04T16:20:36 (127.0.0.1:38127) received handshake 'Z303'



What confuses me is that I though that a root object for the database 
would be created by the client, and a DisconnectedError is raised before 
that happens. What can be happening?


Thanks in advance,

Pedro
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev