Re: [Zope3-Users] problems initializing psycopgda
On 1/5/06, Anthony Wilson <[EMAIL PROTECTED]> wrote: > Hi, > > I am new to zope3 and I recently installed psycopgda-1.0.0 together with > psycopg-1.99.13 under zope-3.1.0. running on linux. psycopg-1.99.13 is a pre/beta-release of psycopg2 Use psycopg1 available at: http://initd.org/pub/software/psycopg/PSYCOPG-1-1/ This is the latest: http://initd.org/pub/software/psycopg/PSYCOPG-1-1/psycopg-1.1.20.tar.gz Regards, Baiju M ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Re: Problems with Zope 3.2.0b3 on Linux
Florent Guillaume wrote: This might, or might not, be related to a problem I discussed in the context of Zope 2 recently on the zodb-dev list. In the case of multidatabases, That's why I asked whether he was using multiple databases. > the initial connection to a secondary database (mountpoints in Zope 2) isn't always joined correctly to the set of connections of the multidatabase, and thus not closed correctly when the main connection is closed. I'm still waiting for feedback about this on zodb-dev. Yeah, I know I need to get to this. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: Problems with Zope 3.2.0b3 on Linux
This might, or might not, be related to a problem I discussed in the context of Zope 2 recently on the zodb-dev list. In the case of multidatabases, the initial connection to a secondary database (mountpoints in Zope 2) isn't always joined correctly to the set of connections of the multidatabase, and thus not closed correctly when the main connection is closed. I'm still waiting for feedback about this on zodb-dev. Florent Marco Groppo wrote: Hi! I'm experiencing some "strange" problems with Zope 3.2.0b3 on GNU/Linux (Ubuntu Breezy i386, kernel 2.6.12, python 2.4.2, gcc 3.4). If I add an object to the root folder (for example using the ZMI) and I try to see one of its browser views Zope sends me a 404 error page. If I add more objects and then I try to delete one of them, sometimes I can still see the object after the deletion (even if I reload the page) and sometimes (for example if I try to reload the page one more time) I can't. I tried to run the tests with 'make check' and the result was: Ran 8033 tests with 0 failures and 0 errors in 604.001 seconds. If I test the installation with bin/zopetest: +++ Running unit tests: Ran 7650 tests with 0 failures and 0 errors in 298.561 seconds. Running zope.app.testing.functional.Functional tests: Set up zope.app.testing.functional.Functional Traceback (most recent call last): File "./zopetest", line 39, in ? sys.exit(testrunner.run(defaults)) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 238, in run failed = run_with_options(options) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 391, in run_with_options setup_layers, failures, errors) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 557, in run_layer setup_layer(layer, setup_layers) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 632, in setup_layer layer.setUp() File "/home/marco/zope3.2/lib/python/zope/app/testing/functional.py", line 197, in setUp FunctionalTestSetup(self.config_file) File "/home/marco/zope3.2/lib/python/zope/app/testing/functional.py", line 139, in __init__ self.app = Debugger(self.db, config_file) File "/home/marco/zope3.2/lib/python/zope/app/debug/debug.py", line 35, in __init__ config(config_file) File "/home/marco/zope3.2/lib/python/zope/app/appsetup/appsetup.py", line 110, in config context = xmlconfig.file(file, context=context, execute=execute) File "/home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py", line 554, in file include(context, name, package) File "/home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py", line 483, in include f = openInOrPlain(path) File "/home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py", line 394, in openInOrPlain fp = open(filename) IOError: [Errno 2] No such file or directory: '/home/marco/zope3.2/bin/ftesting.zcml' +++ I have installed Zope 3.2 b3 on Windows also and I haven't noticed any problem so far. P.S.: sorry for my English... Regards, -- Florent Guillaume, Nuxeo (Paris, France) Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problems with Zope 3.2.0b3 on Linux
Marco Groppo wrote: I forgot to say that some times I get this error when I try to access a ZODB object (it doesn't matter what kind of object): +++ ERROR ZODB.Connection Shouldn't load state for 0x36 when the connection is closed Traceback (most recent call last): File "/usr/lib/python2.4/threading.py", line 422, in run self.__target(*self.__args, **self.__kwargs) File "/home/marco/apps/zope3.2/lib/python/twisted/python/threadpool.py", line 149, in _worker context.call(ctx, function, *args, **kwargs) File "/home/marco/apps/zope3.2/lib/python/twisted/python/context.py", line 59, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/home/marco/apps/zope3.2/lib/python/twisted/python/context.py", line 37, in callWithContext return func(*args,**kw) --- --- File "/home/marco/apps/zope3.2/lib/python/twisted/web2/wsgi.py", line 139, in run result = self.application(self.environment, self.startWSGIResponse) File "/home/marco/apps/zope3.2/lib/python/zope/app/wsgi/__init__.py", line 49, in __call__ request = self.requestFactory(environ['wsgi.input'], environ) File "/home/marco/apps/zope3.2/lib/python/zope/app/publication/httpfactory.py", line 62, in __call__ request_class, publication_class = chooseClasses(method, env) File "/home/marco/apps/zope3.2/lib/python/zope/app/publication/httpfactory.py", line 34, in chooseClasses request_class, publication = factory() File "/home/marco/apps/zope3.2/lib/python/zope/app/publication/requestpublicationfactories.py", line 79, in __call__ request_class = component.queryUtility( File "/home/marco/apps/zope3.2/lib/python/zope/component/__init__.py", line 260, in queryUtility return getSiteManager(context).queryUtility(interface, name, default) File "/home/marco/apps/zope3.2/lib/python/ZODB/Connection.py", line 729, in setstate raise ConnectionStateError(msg) ZODB.POSException.ConnectionStateError: Shouldn't load state for 0x36 when the connection is closed +++ ...and then, if I reload the page, the problem can magically disappear, and if I request the view another time I can get the error again, and so on and so on... it seems to me that the behaviour is totally random. Does anybody know what's going on? For some reason, a database connection wasn't closed properly. Is there anything special about your setup? Is this a plain Zope install? Are you using ZEO? Are you using a single database? Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problems with Zope 3.2.0b3 on Linux
Marco Groppo wrote: Hi! I'm experiencing some "strange" problems with Zope 3.2.0b3 Did you have the problem with beta 2? > on GNU/Linux (Ubuntu Breezy i386, kernel 2.6.12, python 2.4.2, gcc 3.4). If I add an object to the root folder (for example using the ZMI) and I try to see one of its browser views Zope sends me a 404 error page. If I add more objects and then I try to delete one of them, sometimes I can still see the object after the deletion (even if I reload the page) and sometimes (for example if I try to reload the page one more time) I can't. Weird. I haven't seen this. (obviously) > I tried to run the tests with 'make check' and the result was: Ran 8033 tests with 0 failures and 0 errors in 604.001 seconds. If I test the installation with bin/zopetest: +++ Running unit tests: Ran 7650 tests with 0 failures and 0 errors in 298.561 seconds. Running zope.app.testing.functional.Functional tests: Set up zope.app.testing.functional.Functional Traceback (most recent call last): File "./zopetest", line 39, in ? sys.exit(testrunner.run(defaults)) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 238, in run failed = run_with_options(options) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 391, in run_with_options setup_layers, failures, errors) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 557, in run_layer setup_layer(layer, setup_layers) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 632, in setup_layer layer.setUp() File "/home/marco/zope3.2/lib/python/zope/app/testing/functional.py", line 197, in setUp FunctionalTestSetup(self.config_file) File "/home/marco/zope3.2/lib/python/zope/app/testing/functional.py", line 139, in __init__ self.app = Debugger(self.db, config_file) File "/home/marco/zope3.2/lib/python/zope/app/debug/debug.py", line 35, in __init__ config(config_file) File "/home/marco/zope3.2/lib/python/zope/app/appsetup/appsetup.py", line 110, in config context = xmlconfig.file(file, context=context, execute=execute) File "/home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py", line 554, in file include(context, name, package) File "/home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py", line 483, in include f = openInOrPlain(path) File "/home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py", line 394, in openInOrPlain fp = open(filename) IOError: [Errno 2] No such file or directory: '/home/marco/zope3.2/bin/ftesting.zcml' +++ This is very odd. I can't reproduce this. I have installed Zope 3.2 b3 on Windows also and I haven't noticed any problem so far. Maybe you should try the linux installation process again. Is anyone else seeing symptoms like these? P.S.: sorry for my English... It looks good to me. :) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Problems with Zope 3.2.0b3 on Linux
Marco Groppo wrote: ...and then, if I reload the page, the problem can magically disappear, and if I request the view another time I can get the error again, and so on and so on... it seems to me that the behaviour is totally random. Does anybody know what's going on? I don't. But the apparent randomness might be caused by your request being handled by different threads. Perhaps one of them has a problem the others don't share. -- 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] Problems with Zope 3.2.0b3 on Linux
I forgot to say that some times I get this error when I try to access a ZODB object (it doesn't matter what kind of object): +++ ERROR ZODB.Connection Shouldn't load state for 0x36 when the connection is closed Traceback (most recent call last): File "/usr/lib/python2.4/threading.py", line 422, in run self.__target(*self.__args, **self.__kwargs) File "/home/marco/apps/zope3.2/lib/python/twisted/python/threadpool.py", line 149, in _worker context.call(ctx, function, *args, **kwargs) File "/home/marco/apps/zope3.2/lib/python/twisted/python/context.py", line 59, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/home/marco/apps/zope3.2/lib/python/twisted/python/context.py", line 37, in callWithContext return func(*args,**kw) --- --- File "/home/marco/apps/zope3.2/lib/python/twisted/web2/wsgi.py", line 139, in run result = self.application(self.environment, self.startWSGIResponse) File "/home/marco/apps/zope3.2/lib/python/zope/app/wsgi/__init__.py", line 49, in __call__ request = self.requestFactory(environ['wsgi.input'], environ) File "/home/marco/apps/zope3.2/lib/python/zope/app/publication/httpfactory.py", line 62, in __call__ request_class, publication_class = chooseClasses(method, env) File "/home/marco/apps/zope3.2/lib/python/zope/app/publication/httpfactory.py", line 34, in chooseClasses request_class, publication = factory() File "/home/marco/apps/zope3.2/lib/python/zope/app/publication/requestpublicationfactories.py", line 79, in __call__ request_class = component.queryUtility( File "/home/marco/apps/zope3.2/lib/python/zope/component/__init__.py", line 260, in queryUtility return getSiteManager(context).queryUtility(interface, name, default) File "/home/marco/apps/zope3.2/lib/python/ZODB/Connection.py", line 729, in setstate raise ConnectionStateError(msg) ZODB.POSException.ConnectionStateError: Shouldn't load state for 0x36 when the connection is closed +++ ...and then, if I reload the page, the problem can magically disappear, and if I request the view another time I can get the error again, and so on and so on... it seems to me that the behaviour is totally random. Does anybody know what's going on? Thanks in advance -- Marco ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] problems initializing psycopgda
Hi, I am new to zope3 and I recently installed psycopgda-1.0.0 together with psycopg-1.99.13 under zope-3.1.0. running on linux. Whenever I try to initialize psycopgda and restart zope, I get the following error: File "/usr/local/zope/lib/python/psycopgda/adapter.py", line 282, in ? zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/usr/local/zopedocs/etc/site.zcml", line 7.2-7.55 ZopeXMLConfigurationError: File "/usr/local/zopedocs/etc/package-includes/psycopgda-configure.zcml", line 1.0-1.31 ZopeXMLConfigurationError: File "/usr/local/zopedocs/lib/python/psycopgda/configure.zcml", line 6.2 AttributeError: 'module' object has no attribute 'new_type' Does anyone have any suggestions for fixing this? Thanks. Anthony Wilson, Barrie Networks Inc. Tel: (705) 739-5801 Fax: (705) 739-4482 email: [EMAIL PROTECTED] ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] using tal to insert zwiki content
On Wednesday 04 January 2006 16:25, Benji York wrote: > Jeff Shell wrote: > > Viewlets are a new feature in Zope 3.2. > > They are? I don't recall it being so (and would prefer it not). Yep, they are. There was a lot of discussion going on between Gary, Roger and me about the interfaces. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] using tal to insert zwiki content
Jeff Shell wrote: Viewlets are a new feature in Zope 3.2. They are? I don't recall it being so (and would prefer it not). -- 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] using tal to insert zwiki content
On 1/3/06, Brad Allen <[EMAIL PROTECTED]> wrote: > At 11:52 PM -0700 1/2/06, Jeff Shell wrote: > >There are a lot of ways one can go from there. In Zope 3.2, a good > >solution for pages made of parts where the content of the parts comes > >from ZWiki pages, you could probably use viewlets. > > I haven't seen the term "viewlet" defined thus far. In this case, would > that be a view that I would create somewhere outside the zwiki > package? I'd rather > not make changes to the zwiki source code itself, because that would > be difficult to merge with future releases. Viewlets are a new feature in Zope 3.2. They're kindof "views for views". There's documentation in the 'zope.viewlet' package in the 3.2 beta releases. They're a bit more of an advanced feature than regular views, and not something that you necessarily need to concern yourself with right now - especially if you're still new to the Zope 3 system. One of the promises of Zope 3 is that you should be able to make additional views and adapters for other objects without having to touch their code. In the case of zwiki for Zope 3, you can probably declare a new view using the ViewWikiPage class and have it use the 'render()' method, which is what draws the source code. In your own package, you can have: http://namespaces.zope.org/browser";> This just creates a new view that calls the 'render' method of a ViewWikiPage instance. That method is what renders the wiki page's source. Then you can use ``tal:content="structure context/wiki/About_Downwinders/@@render_inline"`` Although, after looking at the ZWiki code quickly, the wiki links that it renders may not be relative to the page they're being viewed from. But you could also subclass zwiki.browser.wikipage.ViewWikiPage and make your own view based on that, overriding the methods it defines for rendering Wiki links. You can do all of this in your own code. It doesn't impact ZWiki - it shouldn't know or care about any custom views you define. ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] sqlos - getting factory of NoneType
>> But when I`m trying to add an >> >> > class="test.main.Person" >> title="Person" >> description="Person objects" >> view="addperson.html" >> permission="zope.ManageContent" >> /> >> >> tag to my configure.zcml - zapi.getFactories() returns me factory of >> NoneType (with name something like "BrowserAdd__test.main.Person" > > No, the above code looks fine. The created factory name seems also ok. > >> Without mentioned addMenuItem tag - everything is OK. > > Okay, so we call those configuration directives. > >> So, the question is - how can i define "proper" factory? > > You can create a factory using the directive by itself or inside > the > directive. There are plenty examples out there describing this. > Hi The problem with sqlos seems: It does only work if ONE AND ONLY ONE factory for the content component (interface) in question is registered. And this one-and-only factory has to be registered with the zcml-directive in a special sqlos namespace, ie. When a second factory is registered for the same interface, ie. sqlos fails to get the objects stored on the database (you get blank browser pages). The reason seems to be the implementation of sqlos.container.SQLObjectContainer, which maps between sql-unique-keys (SQLObject-names) and zope-object-names. The mapping mechanism makes use of the factory. further analysis: >>> from zope.app.debug import Debugger >>> debugger = Debugger('var/Data.fs', 'etc/site.zcml') [snip] >>> root = debugger.root() My SQLObjectContainer is on the root folder an its name is 'resources': >>> resources = root['resources'] >>> resources Now lets check the registered factories: We yust do the same like in the allowedFactories() method of sqlos.container.SQLObjectContainer (first step to map the names) >>> from zope.app import zapi >>> from sqlos.interfaces import ISQLObject >>> from zope.app.container.constraints import checkFactory >>> for name, factory in zapi.getFactoriesFor(ISQLObject, context=resources): ... print "Name: %s ; Factory: %s" % (name, factory) ... if checkFactory(resources, None, factory): ... print "checkedOK" ... Name: quotationtool.BookWithInitialValues ; Factory: checkedOK Name: quotationtool.BookSQLObject ; Factory: > checkedOK *PROBLEM:* the non-sqlos factory certainly is not able do do any name mapping. You see it, when you try do get the keys or items in the container: >>> for key in resources.keys(): print key ... Traceback (most recent call last): File "", line 1, in ? File "/var/lib/zope3.1/instance/zope.test-3.2.0.b2.local/lib/python/sqlos/container.py", line 93, in keys for name, obj in self.items(): yield name File "/var/lib/zope3.1/instance/zope.test-3.2.0.b2.local/lib/python/sqlos/container.py", line 109, in items factory = zapi.getUtility(IISQLObject, factoryName, context=self) File "/usr/local/src/Zope-3.2.0b2/build/lib.linux-i686-2.4/zope/component/__init__.py", line 257, in getUtility raise ComponentLookupError(interface, name) zope.component.interfaces.ComponentLookupError: (, u'quotationtool.BookWithInitialValues') maybe *SOLUTIONS*: 1) I tried a marker-interface which I called ISQLObjectFactory to excpilitely mark the content class as the yust factory. Then I changed the allowedFactories() method: if ISQLObjectFactory.providedBy(factory): yield factory But I didn't come along that way :( 2) I overwrote the allowedFactories() method in the implementation of the container. I am really not happy with it, because checking for a specific factory-name is not the style things should be wired together in zope (not as elegant as 1) ). class ResourceDB(SQLObjectContainer): """A ResourceDB object is the base-container for Books etc.""" implements(IResourceDB) def allowedFactories(self): for name, factory in zapi.getFactoriesFor(ISQLObject, context=self): if name == "quotationtool.BookSQLObject": if checkFactory(self, None, factory): yield name This way it works, I see the sql-objects and can even edit them :) - But works yust to run into the next bigger problem... (I can't create objects due to rollback problems) : *FACIT*: sqlos really *! Regards Christian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-dev] Re: [Zope3-Users] Re: Get classes implementing Interface
Am Samstag, 31. Dezember 2005 14:48 schrieb Florian Lindner: > Am Freitag, 30. Dezember 2005 20:57 schrieb Jeff Shell: > > On 12/30/05, Florian Lindner <[EMAIL PROTECTED]> wrote: > > > Am Freitag, 30. Dezember 2005 17:45 schrieb Jim Fulton: > > > > Philipp von Weitershausen wrote: > > > > > So, what you want is not a list of classes but a list of factories > > > > > that can create IContainers. This is possible by using > > > > > zapi.getUtilitiesFor(IFactory) and then checking each factory's > > > > > getInterfaces() method whether IContainer is a part of the returned > > > > > result. I would probably base an implementation of all on the > > > > > UtilityVocabulary. > > > > > > > > I'll also note that the use case is also directly addressed through > > > > containment constraints. You can say that a container > > > > should only contain objects of some given types and you will get > > > > just those types in the add list. > > > > > > But the HomeFolderManager is not a container itself it's just a utility > > > that creates container upon requests. And I want to make choosable > > > which container to create. Or do I misunderstand you? > > > > Well first (and I apologize if this has been mentioned before), > > 'containers' are a more abstract notion while 'folders' are more > > concrete. A message or document that allows comments might be a > > container, but it's not something that you'd see in the ZMI or any > > content management type interface as a folder. You'd see it as an > > article. > > > > Something that's "Folderish" (to drag up an old term) will probably > > have a folder icon, will probably (but not necessarily) will have > > sub-folders, will have a view to manage its contents, and so on. > > [...] > > Basically the HomeFolderManager (HFM) only creates an 1:1 relation between > a principal and an object. It can also auto-create these objects if the > relation is being read for the first time. In this case the object to be > created is hardcoded to be a zope.app.folder.Folder. The HFM does not care > what is being done with the objects it just returns them. > In my project I've another folderish object that I want to have created, > therefore I forked the HFM and modified the code to create the object I > want. Of course, the common use case would be to create a folderish object, > but any other kind of objects would make sense to. A principal could have a > home page (just one site) which is not folderish neither a IContainer which > could the HFM return. Or a project which can contain comments, which is not > folderis either but is an IContainer implemention. > I think that the HFM should allow creation of ANY objects, regardless of > being folderish or IContainer implemenations. Of course, the name > HomeFOLDERManager would not make sense anymore in this case. > > What do you think? > > Florian No thoughts / opinions of anyone? Can I make the changes to the HomeFolderManager (list box of all classes implementing IContainer to select which class to create) and commit? Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Problems with Zope 3.2.0b3 on Linux
Hi! I'm experiencing some "strange" problems with Zope 3.2.0b3 on GNU/Linux (Ubuntu Breezy i386, kernel 2.6.12, python 2.4.2, gcc 3.4). If I add an object to the root folder (for example using the ZMI) and I try to see one of its browser views Zope sends me a 404 error page. If I add more objects and then I try to delete one of them, sometimes I can still see the object after the deletion (even if I reload the page) and sometimes (for example if I try to reload the page one more time) I can't. I tried to run the tests with 'make check' and the result was: Ran 8033 tests with 0 failures and 0 errors in 604.001 seconds. If I test the installation with bin/zopetest: +++ Running unit tests: Ran 7650 tests with 0 failures and 0 errors in 298.561 seconds. Running zope.app.testing.functional.Functional tests: Set up zope.app.testing.functional.Functional Traceback (most recent call last): File "./zopetest", line 39, in ? sys.exit(testrunner.run(defaults)) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 238, in run failed = run_with_options(options) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 391, in run_with_options setup_layers, failures, errors) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 557, in run_layer setup_layer(layer, setup_layers) File "/home/marco/zope3.2/lib/python/zope/testing/testrunner.py", line 632, in setup_layer layer.setUp() File "/home/marco/zope3.2/lib/python/zope/app/testing/functional.py", line 197, in setUp FunctionalTestSetup(self.config_file) File "/home/marco/zope3.2/lib/python/zope/app/testing/functional.py", line 139, in __init__ self.app = Debugger(self.db, config_file) File "/home/marco/zope3.2/lib/python/zope/app/debug/debug.py", line 35, in __init__ config(config_file) File "/home/marco/zope3.2/lib/python/zope/app/appsetup/appsetup.py", line 110, in config context = xmlconfig.file(file, context=context, execute=execute) File "/home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py", line 554, in file include(context, name, package) File "/home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py", line 483, in include f = openInOrPlain(path) File "/home/marco/zope3.2/lib/python/zope/configuration/xmlconfig.py", line 394, in openInOrPlain fp = open(filename) IOError: [Errno 2] No such file or directory: '/home/marco/zope3.2/bin/ftesting.zcml' +++ I have installed Zope 3.2 b3 on Windows also and I haven't noticed any problem so far. P.S.: sorry for my English... Regards, -- Marco ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] How to render PageTemplate manually?
Hi all My use case: Create content type 'Portlet' that could have TAL as its content and when watched in browser TAL should be redered. My code is below. class PortletView: def renderText(self): portlet = IPortlet(self.context) format = portlet.format if format in ('HTML', 'Plain'): return portlet.getText() elif format == 'Structured': struct = structurize(portlet.getText()) doc = DocumentWithImages()(struct) output = HTMLWithImages()(doc, level=1) return output elif format == 'Page Template': page_template = PageTemplate() page_template.write(portlet.getText()) output = page_template() return output But there is a problem. When I define a variable in template and call it its ok. But I cannot call 'context' variable (for example ). This is my traceback. Traceback (most recent call last): File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\publisher\publish.py", line 138, in publish result = publication.callObject(request, object) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\app\publication\zopepublication.py" , line 164, in callObject return mapply(ob, request.getPositionalArguments(), request) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\publisher\publish.py", line 113, in mapply return debug_call(object, args) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\publisher\publish.py", line 119, in debug_call return object(*args) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\app\pagetemplate\simpleviewclass.py ", line 44, in __call__ return self.index(*args, **kw) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\app\pagetemplate\viewpagetemplatefi le.py", line 83, in __cal l__ return self.im_func(im_self, *args, **kw) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\app\pagetemplate\viewpagetemplatefi le.py", line 51, in __cal l__ sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0), File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\pagetemplate\pagetemplate.py", line 117, in pt_render strictinsert=0, sourceAnnotations=sourceAnnotations)() File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 270, in __call__ self.interpret(self.program) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 345, in interpret handlers[opcode](self, args) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 897, in do_useMacro self.interpret(macro) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 345, in interpret handlers[opcode](self, args) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 531, in do_optTag_tal self.do_optTag(stuff) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 516, in do_optTag return self.no_tag(start, program) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 511, in no_tag self.interpret(program) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 345, in interpret handlers[opcode](self, args) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 867, in do_defineMacro self.interpret(macro) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 345, in interpret handlers[opcode](self, args) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 965, in do_defineSlot self.interpret(block) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 345, in interpret handlers[opcode](self, args) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 955, in do_defineSlot self.interpret(slot) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 345, in interpret handlers[opcode](self, args) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tal\talinterpreter.py", line 758, in do_insertStructure_tal structure = self.engine.evaluateStructure(expr) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tales\tales.py", line 698, in evaluate return expression(self) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tales\expressions.py", line 204, in __call__ return self._eval(econtext) File "C:\Program Files\Python2.4.2\Lib\site-packages\zope\tales\expressions.py", line 198, in _eval return ob() File "c:\Program Files\Python2.4.2\zope-instances\instance-8080\lib\python\acc\swordfish\basi c\portlet.py", line 72, i n renderText output = page_template(content=object,temp="TEMP") File "C:\Program Files\Python2.4.2\Lib\site-pack
Re: [Zope3-Users] SQLObject and SQLOS question
Hi! Stephan Richter wrote: On Tuesday 03 January 2006 05:45, Roman Susi wrote: Now it looks like I need SQLOS (do I need it to my goal???)... Well, sqlos is one approach. It provides a nice layer that connects SQLObject and Zope 3. Are there other approaches like sqlos? OK. good to know. Regards, Stephan Thank you for your answer! Roman ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] PAU and Session Credentials
Am Dienstag, 3. Januar 2006 16:02 schrieb Stephan Richter: > On Sunday 20 November 2005 16:57, Florian Lindner wrote: > > TraversalError: (Principal(u'pre1'), 'getLogin') > > > > The error log information of the user: > > > > User: unauthenticated, pre1, CS.User, The log entry came from the RootErrorReportingUtility. > Ah, there is your problem. IPrincipal does not promise to implement > "getLogin". In fact, the login name is commonly well-protected for security > reasons. I assume that self.request.principal.id comes to be the same like a call to getLogin. Since I don't even use getLogin. What would be your way to work around that? > > > pre is the prefix of my principal folder (BTW: what is the sense of this > > prefix), 1 is the object id of my test principal, CS.User the role of the > > principal. > > Because if you have several different principal folders they might > duplicate principal names (local ids). The prefix helps to distinguish > between the various principal folders. Ok, I see. Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users