Hello ... I've been trying to put together a relatively small ZMI based product. When I go to distribute it, I click on the "distribution" tab, select to allow redistribution and then "create distribution archive", as per the Zope Book. (And I've also tried this w/o allowing redistribution, as well as tried this on the toy "Zoo Exhibit" product in the Zope Book). When I click on "create distribution archive" I get: * Module ZPublisher.Publish, line 175, in publish_module_standard * Module ZPublisher.Publish, line 132, in publish * Module ZPublisher.Publish, line 101, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module App.Product, line 489, in index_html * Module App.Product, line 200, in _distribution ImportError: No module named rotor This also crashes Zope entirely (needs to be restarted). This is with Zope 2.7.3 with python 2.4.1.
From what I've read, the rotor module was deprecated in python 2.3 and then removed in python 2.4, which would be why I don't have the rotor module. One page I found: http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14434
Seems to describe exactly the situation I'm having. My question is what is the appropriate workaround here? Is this considered an issue w/ the version of Python I'm using or the version of Zope? One piece of advice I read (involving importing rotor but not w/ Zope) was to downgrade to Python 2.3 but I'd prefer not to do that. If I upgrade Zope will that remove the dependence on the rotor module? Thanks -J
--On 14. März 2006 14:12:53 -0500 Jeff Gentry <jgentry@jimmy.harvard.edu> wrote:
My question is what is the appropriate workaround here?
Fix the related code and replace the rotor with something similar (never seen any code that uses enigma-style encryption for _serious_ reasons).
Is this considered an issue w/ the version of Python I'm using or the version of Zope? One piece of advice I read (involving importing rotor but not w/ Zope) was to downgrade to Python 2.3 but I'd prefer not to do that. I
If you run Zope 2.7 or 2.8 then using Python 2.4 is and was neither supported nor recommended. Zope 2.9 _requires_ Python 2.4. As stated above: fix the related code or kick the related product. -aj ----------------------------------------------------------------------- - Andreas Jung ZOPYX Ltd. & Co KG - - E-mail: info@zopyx.com Web: www.zopyx.com, www.zopyx.de - -----------------------------------------------------------------------
Fix the related code and replace the rotor with something similar (never seen any code that uses enigma-style encryption for _serious_ reasons).
It is unclear to me why they were using that in the first place. I'm not sure which you mean by 'the related code', you mean the internal Zope code yes? (Since as far as I can tell it isn't being triggered by something I've written).
If you run Zope 2.7 or 2.8 then using Python 2.4 is and was neither supported nor recommended. Zope 2.9 _requires_ Python 2.4.
Ah ... In the 2.7 version of the zope book I saw this: 'Zope 2.7 requires Python 2.3.2 or later' and assumed that the 'or later' was inclusive of later Python versions beyond 2.3.x. Thanks. -J
--On 14. März 2006 14:34:27 -0500 Jeff Gentry <jgentry@jimmy.harvard.edu> wrote:
Fix the related code and replace the rotor with something similar (never seen any code that uses enigma-style encryption for _serious_ reasons).
It is unclear to me why they were using that in the first place. I'm not sure which you mean by 'the related code', you mean the internal Zope code yes? (Since as far as I can tell it isn't being triggered by something I've written).
Zope does not use the rotor module and I don't think that it used the rotor module in the past. -aj ----------------------------------------------------------------------- - Andreas Jung ZOPYX Ltd. & Co KG - - E-mail: info@zopyx.com Web: www.zopyx.com, www.zopyx.de - -----------------------------------------------------------------------
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jeff Gentry wrote:
Zope does not use the rotor module and I don't think that it used the rotor module in the past.
Extensions.py and Product.py both have 'import rotor' calls in Zope 2.7.3-0, from Zope-2.7.3-0/lib/python/App in my installation.
It was there to support a (lame) "opaque" product distribution (for Lever / ZClass products). Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 tseaver@palladion.com 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 iD8DBQFEFzp8+gerLs4ltQ4RAtLIAKDEzS9slAeJzlmnyQ1R8p4WA6TDIgCgphIw xG5w1g20dJ1qlv4YiJCpiX0= =euVv -----END PGP SIGNATURE-----
--On 14. März 2006 16:49:48 -0500 Tres Seaver <tseaver@palladion.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jeff Gentry wrote:
Zope does not use the rotor module and I don't think that it used the rotor module in the past.
Extensions.py and Product.py both have 'import rotor' calls in Zope 2.7.3-0, from Zope-2.7.3-0/lib/python/App in my installation.
It was there to support a (lame) "opaque" product distribution (for Lever / ZClass products).
Now that ZClasses are deprecated in Zope 2.10 I will remove the related distribution code from the trunk. ZClasses-adieu, Andreas
On 3/14/06, Jeff Gentry <jgentry@jimmy.harvard.edu> wrote:
Ah ... In the 2.7 version of the zope book I saw this: 'Zope 2.7 requires Python 2.3.2 or later' and assumed that the 'or later' was inclusive of later Python versions beyond 2.3.x.
Which would have been impossible since they didn't exist then. As a good reason as any not to write "or later". :-) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/
Rotor was removed form python for a variety of reasons (see the mailing list archives) but one of them was that it's a terrible way to do any sort of encryption. There are numberous python extensions that do encryption and decryption which could be incorporated into your product. Alternatively, you can add rotor as a python script into your product-- and interesting programming project <smile. Or you can add back in the rotormodule as a Python Extension. The rotormodule can be picked up for the Module directory of the Python 1.5 directory. On Tue, 14 Mar 2006, Jeff Gentry wrote:
Hello ...
I've been trying to put together a relatively small ZMI based product. When I go to distribute it, I click on the "distribution" tab, select to allow redistribution and then "create distribution archive", as per the Zope Book. (And I've also tried this w/o allowing redistribution, as well as tried this on the toy "Zoo Exhibit" product in the Zope Book). When I click on "create distribution archive" I get:
* Module ZPublisher.Publish, line 175, in publish_module_standard * Module ZPublisher.Publish, line 132, in publish * Module ZPublisher.Publish, line 101, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 39, in call_object * Module App.Product, line 489, in index_html * Module App.Product, line 200, in _distribution
ImportError: No module named rotor
This also crashes Zope entirely (needs to be restarted). This is with Zope 2.7.3 with python 2.4.1.
From what I've read, the rotor module was deprecated in python 2.3 and then removed in python 2.4, which would be why I don't have the rotor module. One page I found: http://savannah.nongnu.org/bugs/?func=detailitem&item_id=14434
Seems to describe exactly the situation I'm having.
My question is what is the appropriate workaround here? Is this considered an issue w/ the version of Python I'm using or the version of Zope? One piece of advice I read (involving importing rotor but not w/ Zope) was to downgrade to Python 2.3 but I'd prefer not to do that. If I upgrade Zope will that remove the dependence on the rotor module?
Thanks -J
_______________________________________________ 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 )
--
Rotor was removed form python for a variety of reasons (see the mailing list archives) but one of them was that it's a terrible way to do any sort of encryption. There are numberous python extensions that do encryption and decryption which could be incorporated into your product. Alternatively, you can add rotor as a python script into your product-- and interesting programming project <smile.
As I said elsewhere, I am not doing any encryption. I get the same error using the sample ZooExhibit product in the 2.7 book. My error is coming from Zope files as near as I can tell. Until yesterday evening I had never heard of the rotor module. :) Actually I just downloaded the 2.9.1 tarball and there are references to rotor in there as well: [jgentry@berlioz App]$ pwd /home/jgentry/Zope-2.9.1/Dependencies/App-Zope-2.9.1/App [jgentry@berlioz App]$ grep rotor * Extensions.py: import rotor Extensions.py: rotor.newrotor(prod_id +' shshsh').decrypt(open(p,'rb').read()) Product.py: import rotor Product.py: rot=rotor.newrotor(id+' shshsh') Product.py: import rotor Product.py: rot=rotor.newrotor(rot) -J
--On 14. März 2006 14:43:52 -0500 Jeff Gentry <jgentry@jimmy.harvard.edu> wrote:
Rotor was removed form python for a variety of reasons (see the mailing list archives) but one of them was that it's a terrible way to do any sort of encryption. There are numberous python extensions that do encryption and decryption which could be incorporated into your product. Alternatively, you can add rotor as a python script into your product-- and interesting programming project <smile.
As I said elsewhere, I am not doing any encryption. I get the same error using the sample ZooExhibit product in the 2.7 book. My error is coming from Zope files as near as I can tell. Until yesterday evening I had never heard of the rotor module. :) Actually I just downloaded the 2.9.1 tarball and there are references to rotor in there as well:
[jgentry@berlioz App]$ pwd /home/jgentry/Zope-2.9.1/Dependencies/App-Zope-2.9.1/App [jgentry@berlioz App]$ grep rotor * Extensions.py: import rotor Extensions.py: rotor.newrotor(prod_id +' shshsh').decrypt(open(p,'rb').read()) Product.py: import rotor Product.py: rot=rotor.newrotor(id+' shshsh') Product.py: import rotor Product.py: rot=rotor.newrotor(rot)
Scary enough, but obviously this is dead code...otherwise Zope would not work. -aj ----------------------------------------------------------------------- - Andreas Jung ZOPYX Ltd. & Co KG - - E-mail: info@zopyx.com Web: www.zopyx.com, www.zopyx.de - -----------------------------------------------------------------------
On Tue, 14 Mar 2006, Jeff Gentry wrote:
On Tue, 14 Mar 2006, Andreas Jung wrote:
Scary enough, but obviously this is dead code...otherwise Zope would not work. Okay ... I will try upgrading Zope (which I've been meaning to do anyways) and see if that changes things.
So I upgraded to Zope 2.9.1, using Python 2.4.2, and get the exact same problem. I should note that if I make an empty product, ie just "add product", enter it and go to distribute that I get this same error. exceptions.ImportError Sorry, a site error occurred. Traceback (innermost last): * Module ZPublisher.Publish, line 188, in publish_module_standard * Module ZPublisher.Publish, line 145, in publish * Module ZPublisher.Publish, line 114, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 40, in call_object * Module App.Product, line 491, in index_html * Module App.Product, line 202, in _distribution ImportError: No module named rotor
Jeff, Looks like you've happened on a real bug. rotor() is used when building and loading pyp files but is no longer provided with Python. You should file a bug report. lib/python/App/Extensions.py lib/python/App/Product.py both contain references. If you do not need cross Zope compatibility you should be able to safely remove the calls to rotor objects. Alternatively, you can write a rotor object which does nothing and use that. Rotor is used to "encrypt" and "decrypt" products. This is an obsolete feature of Zope and generally not used (hence, no bug reports). If you must have compatability, you can download Python1.5 and take the rotormodule extension (it's in C) and use it. You'll possibly have to upgrade the API to conform with Zope 2.9.1 and Python 2.4.2. Me, I'd strip out rotor and be done with it. On Tue, 14 Mar 2006, Jeff Gentry wrote:
On Tue, 14 Mar 2006, Jeff Gentry wrote:
On Tue, 14 Mar 2006, Andreas Jung wrote:
Scary enough, but obviously this is dead code...otherwise Zope would not work. Okay ... I will try upgrading Zope (which I've been meaning to do anyways) and see if that changes things.
So I upgraded to Zope 2.9.1, using Python 2.4.2, and get the exact same problem. I should note that if I make an empty product, ie just "add product", enter it and go to distribute that I get this same error.
exceptions.ImportError Sorry, a site error occurred.
Traceback (innermost last):
* Module ZPublisher.Publish, line 188, in publish_module_standard * Module ZPublisher.Publish, line 145, in publish * Module ZPublisher.Publish, line 114, in publish * Module ZPublisher.mapply, line 88, in mapply * Module ZPublisher.Publish, line 40, in call_object * Module App.Product, line 491, in index_html * Module App.Product, line 202, in _distribution
ImportError: No module named rotor
--
Hi Dennis ...
both contain references. If you do not need cross Zope compatibility you should be able to safely remove the calls to rotor objects.
I was just looking at that. By cross Zope compatibility do you mean ability to give the tarball to other people for installation in their Zope? If so, then yes that will be a bit of a problem (The intention here was to distribut to a small group of people). My understanding though was that the tarball that comes out of the distribution generator was to just be unrolled in the Zope instance's Product directory much like python based products though, correct? In which case once I manage to get the built tarball it should be A-OK regardless?
that. Rotor is used to "encrypt" and "decrypt" products. This is an obsolete feature of Zope and generally not used (hence, no bug reports).
This is something that I don't understand. As far as I can tell I'm not in any shape/way/form requesting encryption and briefly looking at the appropriate files in the Zope directory I don't see how they couldn't be triggered. Is there indeed some way to physically avoid this or do people simply not build products via the ZMI -> IE is building of ZMI based Products the obsolete feature or is the rotor encryption?
Me, I'd strip out rotor and be done with it.
I was just getting ready to do just that and see what happens at the other end. :) Thanks -J
participants (5)
-
Andreas Jung -
Dennis Allison -
Jeff Gentry -
Lennart Regebro -
Tres Seaver