[Zope3-Users] Re: zopeproject IServerControl ComponentLookupError
Douglas Cerna wrote: I read Philip's mail and since I'm "playing" with grok and I liked the way installed eggs, I decided to try zopeproject too :) Anyway, I'm getting an error in ++etc++process/servercontrol.html: ... ComponentLookupError: (, '') I don't know if this is an error of mine, a failure in the download process or if it has been fixed already. I just thought it may help :) Thanks for trying out zopeproject. The feedback is useful. According to zopeproject's philosophy, Zope is just a library. Due to the fact that we're using WSGI to deploy the web application, Zope can no longer be in charge of the process or process management. That includes shutting down or restarting "the server" (whatever the server is, it might even be Apache or something like that). To cut a long story short, Zope isn't the server anymore. The Server Control screen is obsolete. That said, it should handle more gracefully. This isn't really a bug in zopeproject. It's a bug in zope.app.applicationcontrol. I've recorded it in the zopeproject collector [1] nonetheless, so I won't forget about it. [1] https://bugs.launchpad.net/zopeproject/+bug/139993 -- http://worldcookery.com -- Professional Zope documentation and training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: "dumping" a component registry
Thank you much Phillip! On Sep 15, 2007, at 7:04 PM, Philipp von Weitershausen wrote: Chris McDonough wrote: I'm having a bit of trouble debugging a failed browser view lookup. It has something to do with environment, because lookups for the view work in one of my sandboxes, and fail in another, even though both seemingly has the same ZCML and code. Does anyone have any scripts already written that, say, at "zopectl run" time dump the various component registries to a human-consumable format so problems like this can be debugged more simply? >>> from zope.component import getSiteManager >>> reg = getSiteManager() >>> from pprint import pprint >>> for info in reg.registeredAdapters(): ... pprint((info.required, info.provided, info.factory, info.name)) ... This will probably drown you with information, though. One step would be to constrain the output only to browser views, in other words, 2-way multi-adapters whose second required interface is or extends IBrowserRequest: >>> from zope.publisher.interfaces.browser import IBrowserRequest >>> for info in reg.registeredAdapters(): ... if (len(info.required) == 2 and ... info.required[1].isOrExtends(IBrowserRequest)): ... pprint((info.required, info.provided, info.factory, ... info.name)) ... For better findability, you might want to search by name now. This is left up to the skilled reader as an exercise ;) In my experience, failed adapter lookups are mostly due to * configuration simply not getting loaded, * things being registered for one thing but objects providing another (this can be especially confusing if the two things that are separate have similar or equal names, therefore making you believe they're the same. Python's "is" operator will do wonders). * in case of browser views, missing layers applied to the request. -- http://worldcookery.com -- Professional Zope documentation and training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Announcing zopeproject 0.4
On 16 Sep 2007, at 21:36 , Lorenzo Gil Sanchez wrote: thanks a lot for adding a debug script to the bin directory. It's one of the few things I missed from this great package! I may suggest you could add the changes of the 0.4 version to this announce email. Just a minor issue :-) Since I was announcing zopeproject to the outside world (as opposed to just zope3-dev) for the first time, I didn't consider adding the change list. Also, 0.4 has quite a lot of them. For anybody who's interested in the changelog, here it is: http:// pypi.python.org/pypi/zopeproject#changes ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] zopeproject IServerControl ComponentLookupError
Hi. I read Philip's mail and since I'm "playing" with grok and I liked the way installed eggs, I decided to try zopeproject too :) Anyway, I'm getting an error in ++etc++process/servercontrol.html: File "/docs/docs/grok/buildout-eggs/tmpRlWIg5/zope.tales-3.4.0a1-py2.4.egg/zope/tales/expressions.py", line 217, in __call__ File "/docs/docs/grok/buildout-eggs/tmpRlWIg5/zope.tales-3.4.0a1-py2.4.egg/zope/tales/expressions.py", line 211, in _eval File "/docs/docs/grok/buildout-eggs/tmp9PaAe_/zope.app.applicationcontrol-3.4_dev_r73715-py2.4.egg/zope/app/applicationcontrol/browser/servercontrol.py", line 33, in action File "/docs/docs/grok/buildout-eggs/tmp9PaAe_/zope.app.applicationcontrol-3.4_dev_r73715-py2.4.egg/zope/app/applicationcontrol/browser/servercontrol.py", line 29, in serverControl File "/docs/docs/grok/buildout-eggs/tmpGJB-r_/zope.component-3.4.0a1-py2.4.egg/zope/component/_api.py", line 207, in getUtility ComponentLookupError: (, '') I don't know if this is an error of mine, a failure in the download process or if it has been fixed already. I just thought it may help :) Regards, Douglas. Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/ ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Announcing zopeproject 0.4
Hi Philipp, thanks a lot for adding a debug script to the bin directory. It's one of the few things I missed from this great package! I may suggest you could add the changes of the 0.4 version to this announce email. Just a minor issue :-) Thanks, really! Lorenzo Gil El dom, 16-09-2007 a las 17:01 +0200, Philipp von Weitershausen escribió: > zopeproject makes it easy to get started with a web application based on > Zope eggs, zc.buildout and WSGI/Paste. If you're not familiar with this > world yet, zopeproject is your easy entry to it. If you are, zopeproject > will save you lots of typing up the boilerplate. > > Why eggs? > - > > Because they are a great way to distribute Python software and declare > its dependencies. Zope 3.4 is completely distributed as individual eggs > and will from now on be developed as such. > > What's zc.buildout? > --- > > It's a tool for repeatable deployments that's configuration-file driven. > You tell it "install these eggs for me, create this script and let me > develop packages in this directory" and it will go ahead and do all > that. Over and over again, if necessary, and for everybody who wants the > same setup as you (which is great for teams). > > What are WSGI and Paste? > > > WSGI is a Python standard for web applications and web servers. It > defines how they communicate so that potentially any WSGI application > can run on any WSGI gateway (server). Zope has had support for WSGI for > a while now, but it has never really been exposed, even though it offers > great possibilities such as middlewares. > > Paste is a collection of related to WSGI. One of its tools, PasteDeploy, > is of particular interest. It allows you to plug WSGI applications, > middlwares and gateways together using a simple configuration file. > > zopeproject vs. instances > - > > Apart from all the flashy technology that zopeproject brings us, it also > implies a big conceptual change in the way we develop web applications > with Zope. > > In the world of regular instances, Zope is the server and the > application. Your code is just like a plug-in:: > >++ +-+ >|Zope| runs |your code| >|server & app| > | (plugin)| >++ +-+ > > Even though we've been doing it for years ("Products" ring any bells?), > I think this is backwards and accounts for much of the irritation people > coming to Zope have. > > With zopeproject's approach, *your code* is the application. The web > application, to be precise. And it *happens* to use Zope. As a library:: > >++ +-+ +-+ >|WSGI gateway| serves | your code | uses | Zope | >| (server) | --> |(application)| > |libraries| >++ +-+ +-+ > > Zope isn't the center of attention anymore, your application is. Even > better, you can choose how much of Zope you'd really like to use. You > may compare this approach to a GUI application that happens to use some > sort of GUI framework to get some widgets on the screen, but otherwise > it's just like any other, real application. > > So how does it work? > > > It's pretty easy. All you need to do is install zopeproject first. You > don't need to install Zope for this, zopeproject will do that for you > later. Note that you will have to have setuptools installed for this > to work (it provides the easy_install script):: > >$ easy_install zopeproject > > Depending on where and how you installed Python, you may have to prefix > this command with "sudo" to gain privileges for installing packages > globally. > > Now you can create a new web application:: > > $ zopeproject WebApp > > Much like with mkzopeinstance, you'll be asked a couple of questions. > The last question concerns the central download location for eggs (which > will include the Zope eggs). After the questions, zopeproject will > create a 'WebApp' directory with some initial directory structure, as > well as download and install the Zope eggs. > > To start the application, go to the newly created directory and invoke > the server:: > >$ cd WebApp >$ bin/paster serve deploy.ini > > You may also use the webapp-ctl script which works much like zopectl:: > >$ bin/webapp-ctl fg > > You will then be able to go to http://localhost:8080 and see the default > Zope screen (The standard boilerplate simply uses the Zope 3 default, > after all. It is now up to you to change that.) > > More information and feedback > - > > For more information, please refer to zopeproject's homepage on PyPI: > http://pypi.python.org/pypi/zopeproject > > I'm very much interested in getting your feedback. Please direct > questions that are of public interest to the zope3-users@zope.org list. > Bugs may be
[Zope3-Users] Prevent an event
Is there away to prevent the catalog from auto-indexing upon creation of the catalog? Thanks, Kevin Smith ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Announcing zopeproject 0.4
zopeproject makes it easy to get started with a web application based on Zope eggs, zc.buildout and WSGI/Paste. If you're not familiar with this world yet, zopeproject is your easy entry to it. If you are, zopeproject will save you lots of typing up the boilerplate. Why eggs? - Because they are a great way to distribute Python software and declare its dependencies. Zope 3.4 is completely distributed as individual eggs and will from now on be developed as such. What's zc.buildout? --- It's a tool for repeatable deployments that's configuration-file driven. You tell it "install these eggs for me, create this script and let me develop packages in this directory" and it will go ahead and do all that. Over and over again, if necessary, and for everybody who wants the same setup as you (which is great for teams). What are WSGI and Paste? WSGI is a Python standard for web applications and web servers. It defines how they communicate so that potentially any WSGI application can run on any WSGI gateway (server). Zope has had support for WSGI for a while now, but it has never really been exposed, even though it offers great possibilities such as middlewares. Paste is a collection of related to WSGI. One of its tools, PasteDeploy, is of particular interest. It allows you to plug WSGI applications, middlwares and gateways together using a simple configuration file. zopeproject vs. instances - Apart from all the flashy technology that zopeproject brings us, it also implies a big conceptual change in the way we develop web applications with Zope. In the world of regular instances, Zope is the server and the application. Your code is just like a plug-in:: ++ +-+ |Zope| runs |your code| |server & app| > | (plugin)| ++ +-+ Even though we've been doing it for years ("Products" ring any bells?), I think this is backwards and accounts for much of the irritation people coming to Zope have. With zopeproject's approach, *your code* is the application. The web application, to be precise. And it *happens* to use Zope. As a library:: ++ +-+ +-+ |WSGI gateway| serves | your code | uses | Zope | | (server) | --> |(application)| > |libraries| ++ +-+ +-+ Zope isn't the center of attention anymore, your application is. Even better, you can choose how much of Zope you'd really like to use. You may compare this approach to a GUI application that happens to use some sort of GUI framework to get some widgets on the screen, but otherwise it's just like any other, real application. So how does it work? It's pretty easy. All you need to do is install zopeproject first. You don't need to install Zope for this, zopeproject will do that for you later. Note that you will have to have setuptools installed for this to work (it provides the easy_install script):: $ easy_install zopeproject Depending on where and how you installed Python, you may have to prefix this command with "sudo" to gain privileges for installing packages globally. Now you can create a new web application:: $ zopeproject WebApp Much like with mkzopeinstance, you'll be asked a couple of questions. The last question concerns the central download location for eggs (which will include the Zope eggs). After the questions, zopeproject will create a 'WebApp' directory with some initial directory structure, as well as download and install the Zope eggs. To start the application, go to the newly created directory and invoke the server:: $ cd WebApp $ bin/paster serve deploy.ini You may also use the webapp-ctl script which works much like zopectl:: $ bin/webapp-ctl fg You will then be able to go to http://localhost:8080 and see the default Zope screen (The standard boilerplate simply uses the Zope 3 default, after all. It is now up to you to change that.) More information and feedback - For more information, please refer to zopeproject's homepage on PyPI: http://pypi.python.org/pypi/zopeproject I'm very much interested in getting your feedback. Please direct questions that are of public interest to the zope3-users@zope.org list. Bugs may be reported in Launchpad: https://launchpad.net/zopeproject. -- http://worldcookery.com -- Professional Zope documentation and training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Re: z3c.form install problem?
xor exor wrote: Hi everyone, I'm just trying to install z3c.from to try it. From its directory i excuted the command : "sudo python setup.py install" to install it and it installed lots of eggs files (most of them zope 3.4). If you install it that way, you will invariably get all its egg dependencies, which means Zope 3.4.x as you observed correctly. Either way, doing a global install is probably the worst thign you can do (see below). Either you a) stay on Zope 3.3 and *don't* install z3c.form via setuptools. Simply copy the package to $INSTANCE/lib/python. That requires, of course, that z3c.form actually works on Zope 3.3. b) move to eggified Zope 3.4. The easiest way to do this is to use zopeproject: http://cheeseshop.python.org/pypi/zopeproject Install zopeproject as mentioned on the page. Then invoke the 'zopeproject' script to create a sandbox, which is like an instance. Finally, proceed with the instructions in the "Adding dependencies to the application" section. -- http://worldcookery.com -- Professional Zope documentation and training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] z3c.form install problem?
Hi everyone, I'm just trying to install z3c.from to try it. From its directory i excuted the command : "sudo python setup.py install" to install it and it installed lots of eggs files (most of them zope 3.4) . I have 3.3.1 on my system and when i execute sudo ./runzope i got errors like : Traceback (most recent call last): File "./runzope", line 48, in ? run() File "./runzope", line 44, in run main(["-C", CONFIG_FILE] + sys.argv[1:]) File "/usr/local/Zope-3.3.1/lib/python/zope/app/twisted/main.py", line 73, in main service = setup(load_options(args)) File "/usr/local/Zope-3.3.1/lib/python/zope/app/twisted/main.py", line 140, in setup zope.app.appsetup.config(options.site_definition, features=features) File "/usr/local/Zope-3.3.1/lib/python/zope/app/appsetup/appsetup.py", line 110, in config context = xmlconfig.file(file, context=context, execute=execute) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 579, in file include(context, name, package) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 515, in include processxmlfile(f, context) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 370, in processxmlfile parser.parse(src) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed self._parser.Parse(data, isFinal) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 364, in end_element_ns self._cont_handler.endElementNS(pair, None) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 349, in endElementNS self.context.end() File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/config.py", line 544, in end self.stack.pop().finish() File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/config.py", line 692, in finish actions = self.handler(context, **args) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 515, in include processxmlfile(f, context) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 370, in processxmlfile parser.parse(src) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed self._parser.Parse(data, isFinal) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 364, in end_element_ns self._cont_handler.endElementNS(pair, None) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 349, in endElementNS self.context.end() File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/config.py", line 544, in end self.stack.pop().finish() File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/config.py", line 692, in finish actions = self.handler(context, **args) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 515, in include processxmlfile(f, context) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 370, in processxmlfile parser.parse(src) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed self._parser.Parse(data, isFinal) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 364, in end_element_ns self._cont_handler.endElementNS(pair, None) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 349, in endElementNS self.context.end() File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/config.py", line 544, in end self.stack.pop().finish() File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/config.py", line 692, in finish actions = self.handler(context, **args) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 515, in include processxmlfile(f, context) File "/usr/local/Zope-3.3.1/lib/python/zope/configuration/xmlconfig.py", line 370, in processxmlfile parser.parse(src) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse self.feed(b