[Zope] import & export error on.2.9.2 version of zope has been solved
The problem with import and export of zope application from zope2.7.3 to zope2.9.2 has been solved.But when I am sending some request to the server that time It's giving error as follows "Error Type: ImportErrorError Value: import of "name of the application" is unauthorized getting this type of error" Is it because of the change in the version of ZODB, in zope2.7.3 they have used the 3.2.4c version ZODB , and in ZOPE2.9.2 used 3.6.0 version ZODB. Sir "Lennart Regebro" has suggested me to copy and paste the data.fs file from Zope2.7.3 where actully my application has developed.Please help me out -- regardsShiv ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: zope 2.8.6 on Mac Intel
Dieter Maurer wrote: manuel spuhler wrote at 2006-4-12 21:40 +0200: ... File "/opt/Zope2.8/lib/python/ZODB/__init__.py", line 21, in ? from persistent import TimeStamp File "/opt/Zope2.8/lib/python/persistent/__init__.py", line 19, in ? from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY ImportError: Inappropriate file type for dynamic loading Something is wrong with your "cPersistent.so" file. It should be a dynamically loaded shared object but somehow it is not. I cannot tell you why... Manuel, Last time I saw cPersistent.so mentioned as a problem it had to do with conflicting python versions. No idea either, otherwise. Did you mention your zope version *and* the python versions you are using? (check your control panel) Didnt see the start of this thread. David ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie needs advice on where to use zope
Sells, Fred wrote at 2006-4-12 16:32 -0400: > ... >So after all that rambling, Is Zope a viable tool or am I killing a gnat >with a cannon? After your somewhat vague description, I would say that your task is not a standard Zope use case. Zope is Web application server. Your task does not seem to be a web application. If you want to manage your "contracts" via a Web interface, then Zope may help you with this part of your task. Zope by itself will not help you to generate layout faithful PDF. There are tools around, like "reportlab", for such tasks that can be used together with Zope. You can also automate OpenOffice from Zope (but see in "[EMAIL PROTECTED]" my notes of warning concerning this use case). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Strategies for testing generated sql?
Paul Winkler wrote at 2006-4-12 12:32 -0400: > ... >Functionally, we are missing some important testables: > ... >* we have no way to verify that these queries behave as expected against > a sample data set. If you want to test this, then do it. It will also cover all other test requirements (e.g. that the SQL is well formed). Of course, you will need an RDBMS to perform the tests against. >How do people test this sort of thing? Do you go whole-hog and >fire up MySQL or whatever? Or use gadfly? sqlite? or what? We do something like this for "Postgres". The test setup assumes that a Postgres installation is running and available for the test. The test is executed against a special test database, copied on test start from a template. After the test, the test database is deleted again. Drawbacks: * there can not be more than a single test running in parallel. Parallel tests would cause Postgres to complain about already existing test databases * deleting the test database was a nightmare. Ever and ever again, Postgres complained about a deletion trial while there were still some uses of the database: sometimes, some transactions have not been committed/aborted; sometimes Postgres connections were still open; sometimes, Postgres did not behave synchronously (the connection was closed, but some part of Postgres was not yet informed about the fact). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: zope 2.8.6 on Mac Intel
manuel spuhler wrote at 2006-4-12 21:40 +0200: > ... > File "/opt/Zope2.8/lib/python/ZODB/__init__.py", line 21, in ? >from persistent import TimeStamp > File "/opt/Zope2.8/lib/python/persistent/__init__.py", line 19, in ? >from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY >ImportError: Inappropriate file type for dynamic loading Something is wrong with your "cPersistent.so" file. It should be a dynamically loaded shared object but somehow it is not. I cannot tell you why... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] ExtFile and TextIndexNG issues
Stefan, Thanks very very much for your help. I just installed ExtFile 1.5 updated with some extra properties I had added to my ExtFile 1.4.4. It works nicely. All of my ExtFile objects are getting catalogged along with some custom content types I created. I just added a txng_get method to those. Very easy. Looks like calls to index_object and reindex_object work fine too. I was getting nervous that I wouldn't be able to do full-text indexing on pdfs, word, etc. but now it looks like everything is all good. Thanks, Tom Palermo -Original Message- From: Stefan H. Holek [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 12, 2006 4:06 AM To: Palermo, Tom Cc: 'zope@zope.org' Subject: Re: [Zope] ExtFile and TextIndexNG issues This however is *exactly* the problem. Please use 1.5. ExtFile 1.4.4's index_html writes to the request regardless of how it was called (by publisher or script). Stefan On 11. Apr 2006, at 19:24, Palermo, Tom wrote: > I haven't tried upgrading to ExtFile 1.5 from the svn trunk yet but I > really don't think that's the problem. I'm going to try that next > (upgrading to ExtFile 1.5). Does anyone have any ideas about what > would cause the ExtFile to launch instead of just get catalogged? -- Anything that happens, happens. --Douglas Adams ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Generic SQL insert
Great idea. Not to be recommended in general. This works because every field is textual, and you are sql-quoting by using type=string. Here are the problems: 1) if someone reads this and does not use the type=string tag, or equivalent, they will be wide open to sql injection. 2) OR, they can pass a list of type with each variable. 3) If you have to handle casts, then you will have to pass a list of cast-types, as well. So, you have essentially moved the problem from making at least one insertion call per table to a single insertion method that requires the creation of two, three, or four lists. This does not self-evidently require less work. You can no longer inspect the method to see if it is correct. You have to look to each call-point to determine what is actually being used. Just as bad, your application goes happily on its way if you are missing (non-key) variables. Keep zsql methods a simple as possible. Use as few tricks as possible. Your goal is self-evident correctness, not the minimization of typing. jim penny [EMAIL PROTECTED] wrote on 04/13/2006 02:23:22 PM: > Whenever I'm using SQL databases in zope, I always seem to have to make > a ZSQL instance for inserting into every table in my database, and they > are all nearly the same - they just have a list of all the fields in the > database in the parameters, then they say: > > insert into [table] ([list of fields]) values ([list of s]) > > I'd much rather have a dictionary of fields and values, and just throw > it at the DB, not having to make those queries for every table. I have > acheived it like so: > > mydict = {"field1":"value1" , "field2":"value2" ,...} > (fields,values)=zip(*myDict.items()) > context.genericInsert(table='table name',fields=fields,values=values) > > Where generic insert is the following ZSQL method: > insert into "" > ("" sequence-end>,) > values ( type=string>,); > > with parameters: > * table - table name > * fields - list of fieldnames > * values - list of values in the same order > > What do other people think of this? Is it a really bad idea? > > Robert Munro > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] creating users in zope. Login error
On 4/12/06, JulianRead <[EMAIL PROTECTED]> wrote: > > Hi i have created a plone site and now i want to create a user using zope and > give them ownership rights to plone. > > At the moment i have created a user using the acl users button on the left > menu bar > and given them ownership rights Which acl_users folder? The site root's, or the Plone site's? > Once i have created the user i am unable to log into zope using them. You mean log into the Zope management screens (ZMI)? I believe that giving your new user the Owner role is not enough to allow them to login to the ZMI of the site root. Manager role would achieve that. > Does anyone know how to giv my newly created user the abillity to login. What are you trying to achieve with this user? Logging in as an application manager with full access to the full Zope instance, or with management rights only to the Plone site, or as a Plone user/member, or what? Regards, Rob ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Generic SQL insert
Whenever I'm using SQL databases in zope, I always seem to have to make a ZSQL instance for inserting into every table in my database, and they are all nearly the same - they just have a list of all the fields in the database in the parameters, then they say: insert into [table] ([list of fields]) values ([list of s]) I'd much rather have a dictionary of fields and values, and just throw it at the DB, not having to make those queries for every table. I have acheived it like so: mydict = {"field1":"value1" , "field2":"value2" ,...} (fields,values)=zip(*myDict.items()) context.genericInsert(table='table name',fields=fields,values=values) Where generic insert is the following ZSQL method: insert into "" ("",) values (,); with parameters: * table - table name * fields - list of fieldnames * values - list of values in the same order What do other people think of this? Is it a really bad idea? Robert Munro ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] TAL page whitespace removal
One more correction for the archives: On Thu, Apr 13, 2006 at 11:45:41AM -0400, Paul Winkler wrote: > On Thu, Apr 13, 2006 at 09:04:38AM -0500, Floyd May wrote: > > Paul Winkler wrote: > > >Note that this doesn't buy you any improved responsiveness > > >if you're running behind e.g. apache, because apache has to > > >read the entire response from Zope before it starts sending it > > >back to the client. That sentence is flat wrong. It only looks that way if your data size is smaller than apache's buffer size. -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] TAL page whitespace removal
On Thu, Apr 13, 2006 at 09:04:38AM -0500, Floyd May wrote: > Paul Winkler wrote: > >On Wed, Apr 12, 2006 at 01:56:58PM -0500, Floyd May wrote: > >>One solution I've found is to buffer the writes to REQUEST.RESPONSE by > >>using a python script which the calls granular page templates rather > >>than a single monolithic template, and outputting the results 25k at a > >>time or so; it gives the rest of the server some time to catch up. > > > >Note that this doesn't buy you any improved responsiveness > >if you're running behind e.g. apache, because apache has to > >read the entire response from Zope before it starts sending it > >back to the client. > > > > Wasn't aware of that, but I've tested it from behind Squid, and it works > like a charm. Actually I really should qualify that; it depends what you're trying to do. The only "problem" I have with streaming behind mod_proxy / mod_rewrite is that it does some buffering, and AFAIK there's no way to turn that off on a per-request basis. Even on a global basis it looks like the ProxyReceiveBufferSize can't be set to less than 512 bytes. (Which would probably make performance suck for everything else anyway.) So if you're trying to do some quick-and-dirty pre-AJAX-style status information, where you're streaming small bits of text to the browser, as I did in the ZSyncer UI, then you're out of luck. It's trivial to verify this with a particular reverse proxy setup by visiting a script something like: # Assuming you've made time importable... import time response = context.REQUEST.RESPONSE msgs = 'hello\n' * 20 response.setHeader('content-type', 'text/html') response.setHeader('content-length', str(len(msgs))) for line in msgs.split(): response.write(line + '\n') time.sleep(0.5) If I view this directly at the zope server, I see each "hello" appear after a short delay. If I view it via apache with mod_rewrite, I see nothing for 10 seconds, then the whole page at once. (Note you can simply leave out the content-length header to get response.write() to use http 1.1-style chunking, which is convenient if you can't pre-calculate an accurate size. This has the same buffering issue behind Apache, and additionally requires the client to be using http 1.1.) OTOH, if you're streaming large blobs in chunks of e.g. 64kb, streaming through apache seems to work just fine. This is probably a more common case. -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: getting error in export and import on zope2.9
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas Jung wrote: > > > --On 13. April 2006 11:49:38 +0200 Andreas Jung > <[EMAIL PROTECTED]> wrote: > >> >> >> --On 13. April 2006 02:46:44 -0700 shivayogi kumbar >> <[EMAIL PROTECTED]> wrote: >> >>> I am trying to import file from zope2.9 that has been exported in xml >>> format from the same.I am getting error as follows. >>> " >>> Site Error >>> >>> An error was encountered while publishing this resource. >>> >>> Error Type: UnicodeDecodeError >>> Error Value: 'ascii' codec can't decode byte 0x83 in position 10: >>> ordinal not in range(128)" >>> -- > > > Also you did not tell us about the exact Zope 2.9 version. According to > the logs there are some changes in 2.9.2 concerning XML export. See the collector issue: http://www.zope.org/Collectors/Zope/2051 Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEPml0+gerLs4ltQ4RAsN0AKC/0tqry+SQ8qQjVm/OoYDRsPU1+QCePlEx JZVnfgr2hyFA/0mLPADEj34= =Fthh -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] TAL page whitespace removal
Paul Winkler wrote: On Wed, Apr 12, 2006 at 01:56:58PM -0500, Floyd May wrote: One solution I've found is to buffer the writes to REQUEST.RESPONSE by using a python script which the calls granular page templates rather than a single monolithic template, and outputting the results 25k at a time or so; it gives the rest of the server some time to catch up. Note that this doesn't buy you any improved responsiveness if you're running behind e.g. apache, because apache has to read the entire response from Zope before it starts sending it back to the client. Wasn't aware of that, but I've tested it from behind Squid, and it works like a charm. -- Floyd May Senior Systems Analyst CTLN - CareerTech Learning Network [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] TAL page whitespace removal
On Wed, Apr 12, 2006 at 01:56:58PM -0500, Floyd May wrote: > One solution I've found is to buffer the writes to REQUEST.RESPONSE by > using a python script which the calls granular page templates rather > than a single monolithic template, and outputting the results 25k at a > time or so; it gives the rest of the server some time to catch up. Note that this doesn't buy you any improved responsiveness if you're running behind e.g. apache, because apache has to read the entire response from Zope before it starts sending it back to the client. -- Paul Winkler http://www.slinkp.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] getting error in export and import on zope2.9
--On 13. April 2006 11:49:38 +0200 Andreas Jung <[EMAIL PROTECTED]> wrote: --On 13. April 2006 02:46:44 -0700 shivayogi kumbar <[EMAIL PROTECTED]> wrote: I am trying to import file from zope2.9 that has been exported in xml format from the same.I am getting error as follows. " Site Error An error was encountered while publishing this resource. Error Type: UnicodeDecodeError Error Value: 'ascii' codec can't decode byte 0x83 in position 10: ordinal not in range(128)" -- Also you did not tell us about the exact Zope 2.9 version. According to the logs there are some changes in 2.9.2 concerning XML export. -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development and consulting pgpmM6bvm4HlV.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] TAL page whitespace removal
Robert (Jamie) Munro wrote: gzip will add enormous processing overhead to the server. Striping spaces will add negligible overhead, likely less overhead than it saves. I hope you've got a full set of tests that prove these sweeping statements you're making ;-) I have written TAL that produces very large dumps of XML data in the past, even whole sites. It's a really nice way to dump data from a database (SQL or Zope DB), but Zope has to build the whole output in RAM before sending any of it, so it can cause the site to crash. Then write your code better. While it's easiest to do this all in memory, it doesn't scale, as you're explaining... I would hope in this kind of case that the TAL is the major user of RAM on the site, Actually, unless you're careful, you're likely to be dragging all the zope objects into memory too, and that'll be what's really killing it ;-) _p_deactivate and zodb object cache minimisation are your friends ;-) > so any saving would be really good, but it all cases (except tags, which I would never use) it seems like a possibly significant gain. I'm afraid I think you're mistaken. Speed-wise, I'll bet the security architecture will cost you much more than gzip _and_ space stripping combined ;-) For memory, doing the whole thing in one go simply won't scale, so you'll have to re-think... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] creating users in zope. Login error
JulianRead wrote: Hi i have created a plone site and now i want to create a user using zope and give them ownership rights to plone. Sounds like a Plohn problem. Go ask on their lists. Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] getting error in export and import on zope2.9
--On 13. April 2006 02:46:44 -0700 shivayogi kumbar <[EMAIL PROTECTED]> wrote: I am trying to import file from zope2.9 that has been exported in xml format from the same.I am getting error as follows. " Site Error An error was encountered while publishing this resource. Error Type: UnicodeDecodeError Error Value: 'ascii' codec can't decode byte 0x83 in position 10: ordinal not in range(128)" -- You asked the same question an hour ago on the Five list and you got the answer that the XML export is buggy and the hint to use the .zexp format. -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development and consulting pgpOu461iYdh1.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] getting error in export and import on zope2.9
I am trying to import file from zope2.9 that has been exported in xml format from the same.I am getting error as follows. " Site Error An error was encountered while publishing this resource. Error Type: UnicodeDecodeError Error Value: 'ascii' codec can't decode byte 0x83 in position 10: ordinal not in range(128)" -- regards Shiv -- regards Shiv ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )