Re: [Zope3-Users] demostorage does not support blobs
Benji York a écrit : On Sat, Apr 19, 2008 at 9:00 PM, Christophe Combelles [EMAIL PROTECTED] wrote: Hello, I can successfully upload a zope.app.file.File with testbrowser, but with zope.file.file.File (blob-based), I get this error 500: add browser.handleErrors = False just before you make the call that raises the exception and you'll see what the underlying exception, not the 500 the publisher generates. Ah ok thanks: Unsupported: Storing Blobs in ZODB.DemoStorage.DemoStorage instance at 0xb6fb8dcc is not supported. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] demostorage does not support blobs
On Sun, Apr 20, 2008 at 4:52 AM, Christophe Combelles [EMAIL PROTECTED] wrote: Unsupported: Storing Blobs in ZODB.DemoStorage.DemoStorage instance at 0xb6fb8dcc is not supported. I don't know if DemoStorage is supposed to work or not, but as a work-around you can try zc.demostorage2 (http://pypi.python.org/pypi/zc.demostorage2). -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] demostorage does not support blobs
On Apr 20, 2008, at 7:13 AM, Benji York wrote: On Sun, Apr 20, 2008 at 4:52 AM, Christophe Combelles [EMAIL PROTECTED] wrote: Unsupported: Storing Blobs in ZODB.DemoStorage.DemoStorage instance at 0xb6fb8dcc is not supported. I don't know if DemoStorage is supposed to work or not, but as a work-around you can try zc.demostorage2 (http://pypi.python.org/pypi/zc.demostorage2 ). Naah, don't think it will help. BlobStorage is a storage proxy, expected to wrap around another storage. Try making a temp directory for the blob storage, setting up a blob storage around the demo storage, and then cleaning up the temp dir at the end of the test. ...or something else, depending on your use case/testing needs. :-) Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] demostorage does not support blobs
Gary Poster a écrit : On Apr 20, 2008, at 7:13 AM, Benji York wrote: On Sun, Apr 20, 2008 at 4:52 AM, Christophe Combelles [EMAIL PROTECTED] wrote: Unsupported: Storing Blobs in ZODB.DemoStorage.DemoStorage instance at 0xb6fb8dcc is not supported. I don't know if DemoStorage is supposed to work or not, but as a work-around you can try zc.demostorage2 (http://pypi.python.org/pypi/zc.demostorage2). Naah, don't think it will help. BlobStorage is a storage proxy, expected to wrap around another storage. Try making a temp directory for the blob storage, setting up a blob storage around the demo storage, and then cleaning up the temp dir at the end of the test. ...or something else, depending on your use case/testing needs. :-) So I believe the blobstorage should be handled by zope.app.testing.functional I've added it as https://bugs.launchpad.net/zope3/+bug/219845 Christophe Gary ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Using z3c.extfile with ZEO
Hello, I am trying to use z3c.extfile on clients running ZEO. My zope.conf has the following configuration: zodb zeoclient server localhost:8101 storage 1 blob-dir var/blob cache-size 20MB /zeoclient /zodb Then I get the following error: 2008-04-20T23:13:54 ERROR ZODB.Connection Couldn't load state for 0x0de14f Traceback (most recent call last): File /root/workspace/eggs/tmpZKaS-m/ZODB3-3.8.0-py2.5-linux-i686.egg/ZODB/Connection.py, line 804, in setstate File /root/workspace/eggs/tmpZKaS-m/ZODB3-3.8.0-py2.5-linux-i686.egg/ZODB/Connection.py, line 869, in _setstate File /root/workspace/eggs/ZODB3-3.8.0-py2.5-linux-i686.egg/ZEO/ClientStorage.py, line 1034, in loadBlob self._server.sendBlob(oid, serial) File /root/workspace/eggs/tmpZKaS-m/ZODB3-3.8.0-py2.5-linux-i686.egg/ZEO/ServerStub.py, line 289, in sendBlob File /root/workspace/eggs/tmpZKaS-m/ZODB3-3.8.0-py2.5-linux-i686.egg/ZEO/zrpc/connection.py, line 679, in call AttributeError: 'FileStorage' object has no attribute 'loadBlob' Does that mean the FileStroage on the ZEO server doesn't support Blob? How should I correctly configure zeo to be able to use z3c.extfile? Thanks. -- Hong Yuan 大管家网上建材超市 装修装潢建材一站式购物 http://www.homemaster.cn ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
On Apr 20, 2008, at 12:06 AM, Darryl Cousins wrote: ... If I have understood the code correctly in zope.deferredimport the problem which zope.proxy.ProxyBase answers is in the following snippet from z.deferredimport.deferredmodule:initialize [1] where a type(module) comparison is made. Therefore, if I could understand fully Jim's statement: the inspect module's assumption that a module is not a module unless it subclasses the standard Python module type Then I could attempt to substitute pure-python code for the type(module) problem which appears in the `initialize` method. I'm not sure what you mean. The idea is to provide a pure-python implementation of ModuleProxy. ModuleProxy doesn't have to be as complete as zope.proxy allows. The need for a proxy is due to the inspect module's use of isinstance. isinstance in turn uses an object's __class__ attribute, which a proxy can override. I hope this hint helps. Jim -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Using z3c.extfile with ZEO
On 20.04.2008, at 17:24, Yuan HOng wrote: Hello, I am trying to use z3c.extfile on clients running ZEO. My zope.conf z3c.extfile has nothing to do with blob storage. when using z3c.extfile you need to export the storage-directory e.g. via NFS to the zope clients. the README files of z3c.extfile show how to configure it. jodok has the following configuration: zodb zeoclient server localhost:8101 storage 1 blob-dir var/blob cache-size 20MB /zeoclient /zodb Then I get the following error: 2008-04-20T23:13:54 ERROR ZODB.Connection Couldn't load state for 0x0de14f Traceback (most recent call last): File /root/workspace/eggs/tmpZKaS-m/ZODB3-3.8.0-py2.5-linux- i686.egg/ZODB/Connection.py, line 804, in setstate File /root/workspace/eggs/tmpZKaS-m/ZODB3-3.8.0-py2.5-linux- i686.egg/ZODB/Connection.py, line 869, in _setstate File /root/workspace/eggs/ZODB3-3.8.0-py2.5-linux-i686.egg/ZEO/ ClientStorage.py, line 1034, in loadBlob self._server.sendBlob(oid, serial) File /root/workspace/eggs/tmpZKaS-m/ZODB3-3.8.0-py2.5-linux- i686.egg/ZEO/ServerStub.py, line 289, in sendBlob File /root/workspace/eggs/tmpZKaS-m/ZODB3-3.8.0-py2.5-linux- i686.egg/ZEO/zrpc/connection.py, line 679, in call AttributeError: 'FileStorage' object has no attribute 'loadBlob' Does that mean the FileStroage on the ZEO server doesn't support Blob? How should I correctly configure zeo to be able to use z3c.extfile? Thanks. -- Hong Yuan 大管家网上建材超市 装修装潢建材一站式购物 http://www.homemaster.cn ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users -- Beautiful is better than ugly. -- The Zen of Python, by Tim Peters Jodok Batlogg, Lovely Systems GmbH Schmelzhütterstraße 26a, 6850 Dornbirn, Austria mobile: +43 664 9636963, phone: +43 5572 908060 ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Pure python packages for zope.component and zope.interface
On Sun, 2008-04-20 at 12:42 -0400, Jim Fulton wrote: On Apr 20, 2008, at 12:06 AM, Darryl Cousins wrote: ... If I have understood the code correctly in zope.deferredimport the problem which zope.proxy.ProxyBase answers is in the following snippet from z.deferredimport.deferredmodule:initialize [1] where a type(module) comparison is made. Therefore, if I could understand fully Jim's statement: the inspect module's assumption that a module is not a module unless it subclasses the standard Python module type Then I could attempt to substitute pure-python code for the type(module) problem which appears in the `initialize` method. I'm not sure what you mean. The idea is to provide a pure-python implementation of ModuleProxy. ModuleProxy doesn't have to be as complete as zope.proxy allows. The need for a proxy is due to the inspect module's use of isinstance. isinstance in turn uses an object's __class__ attribute, which a proxy can override. Yes, I was off track a little with my last mail. I did get that I need to replace ModuleProxy as you say. I'm trying to figure just what is required of the ModuleProxy class (if not to be as complete as zope.proxy.ProxyBase). I'm not doing very well with understanding _zope_proxy_proxy.c to even figure out what ProxyBase does provide. I hope this hint helps. Well, yes. But I think the task may be beyond my level of understanding. Regards, Darryl Jim -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users