Hi, I'm having trouble getting ZopeXMLMethods to work.
From the various possible dependencies, I decided to use 4Suite and PyXML, which I untarred into my /usr/local directory and installed with the Python used by Zope: /usr/local/www/Zope/bin/python setup.py install
I installed ZopeXMLMethods from the FreeBSD port, and now I have XSLTMethod and XML Method Cache Manager in the ZMI dropdown. However, when I attempt to add a XSLTMethod, I get "No supported XSLT processors available", which I take to mean that Zope isn't finding 4Suite etc. Must I add a line to zope.conf? Mine is totally vanilla (I think I just renamed the sample). I couldn't find any examples online of a customized zope.conf. Here are my other installation values: Zope Version: (unreleased version, python 2.3.4, freebsd4) Python Version: 2.3.4 (#2, Sep 6 2004, 12:15:06) [GCC 2.95.4 20020320 [FreeBSD]] System Platform: freebsd4 SOFTWARE_HOME: /usr/local/www/Zope/lib/python ZOPE_HOME: /usr/local/www/Zope INSTANCE_HOME: /usr/local/www/Zope/zope01 CLIENT_HOME: /usr/local/www/Zope/zope01/var Thanks for any help, Ken Ara __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail
Ken Ara wrote at 2004-11-25 07:31 -0800:
... I'm having trouble getting ZopeXMLMethods to work. ... I installed ZopeXMLMethods from the FreeBSD port, and now I have XSLTMethod and XML Method Cache Manager in the ZMI dropdown.
However, when I attempt to add a XSLTMethod, I get "No supported XSLT processors available", which I take to mean that Zope isn't finding 4Suite etc.
Must I add a line to zope.conf?
Almost surely not. It would probably the best approach to look at the code (or read the installation instructions) to find out how "ZopeXMLMethods" tries to find applicable XSLT processors. -- Dieter
It would probably the best approach to look at the code (or read the installation instructions) to find out how "ZopeXMLMethods" tries to find applicable XSLT processors.
-- Dieter
Well, I guess you are right, so let's get started.. Install ZopeTestCase to complete install of ZopeXMLMethods. Now to test: ken> /usr/local/www/Zope/bin/python runalltests.py SOFTWARE_HOME: /usr/local/www/Zope/lib/python INSTANCE_HOME: /usr/local/www/Zope (...) Ran 167 tests in 1.630s OK --- next, test ZopeXMLMethods: ken> /usr/local/www/Zope/bin/python /usr/local/www/Zope/Products/ZopeXMLMethods/tests/alltests.py Unable to locate Testing package But Testing is in my SOFTWARE_HOME, at /usr/local/www/Zope/lib/python/Testing This proves there is something basic I don't understand. Please, what is it? Ken __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail
Ken Ara wrote at 2004-11-25 15:26 -0800:
... Well, I guess you are right, so let's get started.. Install ZopeTestCase to complete install of ZopeXMLMethods. ... ken> /usr/local/www/Zope/bin/python /usr/local/www/Zope/Products/ZopeXMLMethods/tests/alltests.py Unable to locate Testing package
Are you sure, "ZopeXMLMethods" is designed for "ZopeTestCase" testing? In this case, you would see a "framework.py" file in the folder containing the tests.
But Testing is in my SOFTWARE_HOME, at /usr/local/www/Zope/lib/python/Testing
Maybe, you add ".../lib/python" to your PythonPath before you start the test.
This proves there is something basic I don't understand. Please, what is it?
I do not know. I have never used "ZopeXMLMethods" (nor seen it). I would approach your problem by searching the sources for your error message ("no ... XSLT processor ...") and look around how the list of available XSLT processors is determined. -- Dieter
Thank you Dieter. Yes, ZopeXMLMethods has a /tests folder complete with a framework.py. The test are to determine whether the XSLT transformers are present, among other things. It turns out that I needed to explicitly set my SOFTWARE_HOME before running the tests: ken> setenv SOFTWARE_HOME /usr/local/www/Zope/lib/python That done, I failed all the tests. Both the test and the product make a series of imports from 4Suite, which is located at /usr/local/4Suite-1.0a4. For example: from Ft.Xml.InputSource import InputSource, InputSourceFactory if I try: ken> /usr/local/www/Zope/lib/python ...
from Ft.Xml.InputSource import InputSource, InputSourceFactory Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: No module named Ft.Xml.InputSource
Of course it exists, but how do I tell that to Zope? My config: Zope Version: (unreleased version, python 2.3.4, freebsd4) Python Version: 2.3.4 (#2, Sep 6 2004, 12:15:06) [GCC 2.95.4 20020320 [FreeBSD]] System Platform: freebsd4 SOFTWARE_HOME: /usr/local/www/Zope/lib/python ZOPE_HOME: /usr/local/www/Zope INSTANCE_HOME: /usr/local/www/Zope/zope01 CLIENT_HOME: /usr/local/www/Zope/zope01/var Ken --- Dieter Maurer <dieter@handshake.de> wrote:
Ken Ara wrote at 2004-11-25 15:26 -0800:
... Well, I guess you are right, so let's get started.. Install ZopeTestCase to complete install of ZopeXMLMethods. ... ken> /usr/local/www/Zope/bin/python
/usr/local/www/Zope/Products/ZopeXMLMethods/tests/alltests.py
Unable to locate Testing package
Are you sure, "ZopeXMLMethods" is designed for "ZopeTestCase" testing? In this case, you would see a "framework.py" file in the folder containing the tests.
But Testing is in my SOFTWARE_HOME, at /usr/local/www/Zope/lib/python/Testing
Maybe, you add ".../lib/python" to your PythonPath before you start the test.
This proves there is something basic I don't understand. Please, what is it?
I do not know. I have never used "ZopeXMLMethods" (nor seen it).
I would approach your problem by searching the sources for your error message ("no ... XSLT processor ...") and look around how the list of available XSLT processors is determined.
-- Dieter
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ken Ara wrote: |>>>from Ft.Xml.InputSource import InputSource, | | InputSourceFactory | Traceback (most recent call last): | File "<stdin>", line 1, in ? | ImportError: No module named Ft.Xml.InputSource | | Of course it exists, but how do I tell that to Zope? | Is there a directory named Ft inside /usr/local/www/Zope/lib/python ? Regards Marco -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBp6UGXhfyAQQVoaIRAnRsAJ9tJLMhR1xy4vSnDly94z9IILcgXACdFdDA qaIOgU5am0VlKOCmSOfiBGE= =vRPH -----END PGP SIGNATURE-----
Ciao Marco, First, I made a small mistake copying from another screen. I should have written that I launched the python that runs Zope with the command: ken> /usr/local/www/Zope/bin/python (not usr/local/www/Zope/lib/python), which failed to import the Ft module --- Marco Bizzarri <m.bizzarri@icube.it> wrote:
Is there a directory named Ft inside /usr/local/www/Zope/lib/python ?
Regards Marco
No, /Ft is located at /usr/local/4Suite-1.0a4/Ft The path /usr/local/www/Zope/lib/python is my current SOFTWARE_HOME. How do I tell Zope (2.7) to look in several places? Thanks, Ken
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ken Ara wrote:
|>>>from Ft.Xml.InputSource import InputSource, | | InputSourceFactory | Traceback (most recent call last): | File "<stdin>", line 1, in ? | ImportError: No module named Ft.Xml.InputSource | | Of course it exists, but how do I tell that to Zope? |
__________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail
Hi, I just want to make a python script which generate an html balise. like: generateTable('toto') return "<table><tr><td>toto</td>... etc" but when i want to use it in a span (span tal:content="generateTable...") all the html are change like that : <table border='1'> Can you help me to prevent that. Thx
--On Montag, 29. November 2004 19:48 Uhr +0100 baptiste Ancey <baptiste.ancey@derivexperts.com> wrote:
but when i want to use it in a span (span tal:content="generateTable...") all the html are change like that : <table border='1'>
Check out the 'structure' keyword in ZPT (-> Zope Book -> ZPT Reference). -aj
baptiste Ancey wrote:
Hi,
I just want to make a python script which generate an html balise. like: generateTable('toto') return "<table><tr><td>toto</td>... etc"
but when i want to use it in a span (span tal:content="generateTable...") all the html are change like that : <table border='1'>
Can you help me to prevent that.
you have to use the tal keyword structure. Liks this: <span tal:content="structure here/generateZable" /> Robert
On Mon, Nov 29, 2004 at 07:48:13PM +0100, baptiste Ancey wrote:
Hi,
I just want to make a python script which generate an html balise. like: generateTable('toto') return "<table><tr><td>toto</td>... etc"
but when i want to use it in a span (span tal:content="generateTable...") all the html are change like that : <table border='1'>
Can you help me to prevent that.
Use the "structure" keyword as documented in the Zope Book. -- Paul Winkler http://www.slinkp.com
Hi, Am Montag, den 29.11.2004, 19:48 +0100 schrieb baptiste Ancey:
Hi,
I just want to make a python script which generate an html balise. like: generateTable('toto') return "<table><tr><td>toto</td>... etc"
but when i want to use it in a span (span tal:content="generateTable...") all the html are change like that : <table border='1'>
Can you help me to prevent that.
Apart from the structure keyword mentioned in all the other posts, it might be well worth thinking about if you need it in the first place. Why not just generate a list or list of lists and use the template (or a macro) to generate the table? Building of HTML in a python script with string concenation is usually a kludge. Regards Tino
Ken Ara wrote at 2004-11-26 13:36 -0800:
... Both the test and the product make a series of imports from 4Suite, which is located at /usr/local/4Suite-1.0a4. For example:
from Ft.Xml.InputSource import InputSource, InputSourceFactory ... Of course it exists, but how do I tell that to Zope?
Either, you extend the PYTHONPATH to include the 4Suite libraries or (probably better) you install 4Suite into Python's "site-packages" directory. Most modern packages for Python use "dist-utils". You recognize this when you see a "setup.py" file in the distribution. In this case, you install via <yourPython> setup.py install This also builds all necessary extensions (4Suite may require an extension "cDomlette") -- Dieter
Once again, thank you Dieter and others who have had the patience to help me learn. I searched a lot but never did find out where one should install third party Python modules. It is often mentioned that they should be installed using the same Python that runs Zope, but not where to install! I installed 4Suite and Py-XML into my SOFTWARE_HOME. Now I can import the 4Suite modules from the command line using Zope's python. But when I ran the tests that come with ZopeXMLMethods, the product is still unable to import the necessary modules. Maybe this is linked to the other, _new_ problem I have: Now, when I try to add a XSLTMethod from the ZMI, I get the following message (before the add form can display) : ------------- Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.PageTemplates.PageTemplateFile, line 106, in _exec Module Products.PageTemplates.PageTemplate, line 96, in pt_render - <PageTemplateFile at /M/create> Module TAL.TALInterpreter, line 190, in __call__ Module TAL.TALInterpreter, line 234, in interpret Module TAL.TALInterpreter, line 611, in do_loop_tal Module Products.PageTemplates.TALES, line 206, in setRepeat Module Products.PageTemplates.TALES, line 221, in evaluate - URL: create - Line 70, Column 6 - Expression: standard:'here/availableProcessors' - Names: {'container': <__FactoryDispatcher__ instance at 8f849e0>, 'context': <__FactoryDispatcher__ instance at 8f849e0>, 'default': <Products.PageTemplates.TALES.Default instance at 0x89fef6c>, 'here': <__FactoryDispatcher__ instance at 8f849e0>, 'loop': <SafeMapping instance at 8f842c0>, 'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x8a043ec>, 'nothing': None, 'options': {'args': ()}, 'repeat': <SafeMapping instance at 8f842c0>, 'request': <HTTPRequest, URL=http://zope.myserver.com/M/manage_addProduct/ZopeXMLMethods/create>, 'root': <Application instance at a87b3e0>, 'template': <PageTemplateFile at /M/create>, 'traverse_subpath': [], 'user': ken} Module Products.PageTemplates.Expressions, line 201, in __call__ Module Products.PageTemplates.Expressions, line 189, in _eval Module Products.PageTemplates.Expressions, line 145, in _eval - __traceback_info__: here Module Products.PageTemplates.Expressions, line 340, in restrictedTraverse - __traceback_info__: {'path': ['availableProcessors'], 'TraversalRequestNameStack': []} Unauthorized: You are not allowed to access 'availableProcessors' in this context ------------- This problem was mentioned recently on this list ( http://mail.zope.org/pipermail/zope/2004-November/154510.html ), but no solution was posted. The problem seems to affect Zope 2.7.3. I would be grateful for any hints.. Ken Ara --- Dieter Maurer <dieter@handshake.de> wrote:
Ken Ara wrote at 2004-11-26 13:36 -0800:
... Both the test and the product make a series of imports from 4Suite, which is located at /usr/local/4Suite-1.0a4. For example:
from Ft.Xml.InputSource import InputSource, InputSourceFactory ... Of course it exists, but how do I tell that to Zope?
Either, you extend the PYTHONPATH to include the 4Suite libraries or (probably better) you install 4Suite into Python's "site-packages" directory.
Most modern packages for Python use "dist-utils". You recognize this when you see a "setup.py" file in the distribution. In this case, you install via
<yourPython> setup.py install
This also builds all necessary extensions (4Suite may require an extension "cDomlette")
-- Dieter
__________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ken Ara wrote: | Once again, thank you Dieter and others who have had | the patience to help me learn. I searched a lot but | never did find out where one should install third | party Python modules. It is often mentioned that they | should be installed using the same Python that runs | Zope, but not where to install! | | I installed 4Suite and Py-XML into my SOFTWARE_HOME. | Now I can import the 4Suite modules from the command | line using Zope's python. | | But when I ran the tests that come with | ZopeXMLMethods, the product is still unable to import | the necessary modules. | | Maybe this is linked to the other, _new_ problem I | have: | The problem I suspect is that ZopeXMLMethod is not yet been ported to the 2.7.x series. Indeed, it uses something which was feasible in Zope 2.6.x, which is no more allowed in Zope 2.7.x The problem is in the __init__.py inside ZopeXMLMethod, since it uses the methods dictionary to make the availableProcessors method globally avaialbe. Try the enclosed patch... We had a similar problem with our product PAFlow (look in the archives) Regards Marco -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBrIqDXhfyAQQVoaIRArSWAJ0e+jF6DdhJRG7LFCol9LnBwxwRIQCdF8n4 2FKmoHUWY5HRUvv+8LdVlwg= =+tmm -----END PGP SIGNATURE-----
This is the same problem I reported a few weeks ago on this list. It surfaced for the first time in Zope 2.7.3. Zope 2.7.2 still was not affected. cb ----- Original Message ----- From: "Marco Bizzarri" <m.bizzarri@icube.it> To: "Ken Ara" <feedreader@yahoo.com> Cc: <zope@zope.org> Sent: Tuesday, November 30, 2004 3:58 PM Subject: Re: [Zope] ZopeXMLMethods installation woes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ken Ara wrote: | Once again, thank you Dieter and others who have had | the patience to help me learn. I searched a lot but | never did find out where one should install third | party Python modules. It is often mentioned that they | should be installed using the same Python that runs | Zope, but not where to install! | | I installed 4Suite and Py-XML into my SOFTWARE_HOME. | Now I can import the 4Suite modules from the command | line using Zope's python. | | But when I ran the tests that come with | ZopeXMLMethods, the product is still unable to import | the necessary modules. | | Maybe this is linked to the other, _new_ problem I | have: |
The problem I suspect is that ZopeXMLMethod is not yet been ported to the 2.7.x series. Indeed, it uses something which was feasible in Zope 2.6.x, which is no more allowed in Zope 2.7.x
The problem is in the __init__.py inside ZopeXMLMethod, since it uses the methods dictionary to make the availableProcessors method globally avaialbe.
Try the enclosed patch... We had a similar problem with our product PAFlow (look in the archives)
Regards Marco
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBrIqDXhfyAQQVoaIRArSWAJ0e+jF6DdhJRG7LFCol9LnBwxwRIQCdF8n4 2FKmoHUWY5HRUvv+8LdVlwg= =+tmm -----END PGP SIGNATURE-----
---------------------------------------------------------------------------- ----
--- __init__.py.dist 2004-11-30 15:55:06.000000000 +0100 +++ __init__.py 2004-11-30 15:56:05.000000000 +0100 @@ -18,6 +18,7 @@
from XSLTMethod import manage_addXSLTMethod, \ manage_addXSLTMethodForm, addXSLTMethod +from XSLTMethod.XSLTMethod import availableProcessors from CacheManager import manage_addXMLMethodCacheManagerForm, \ manage_addXMLMethodCacheManager, addXMLMethodCacheManager
@@ -41,7 +42,8 @@ context.registerClass( CacheManager.CacheManager, constructors = ( manage_addXMLMethodCacheManagerForm,
manage_addXMLMethodCacheManager,
- addXMLMethodCacheManager), + addXMLMethodCacheManager, + availableProcessors), icon = 'www/cache.gif' )
context.registerHelp()
---------------------------------------------------------------------------- ----
_______________________________________________ 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 )
On Tuesday 30 November 2004 21:44, Kees de Brabander wrote:
This is the same problem I reported a few weeks ago on this list. It surfaced for the first time in Zope 2.7.3. Zope 2.7.2 still was not affected. cb I am having the identical problem on Zope 2.7.3 on Windows. Seems to work fine on SuSE 9.1 though. regards garry ----- Original Message ----- From: "Marco Bizzarri" <m.bizzarri@icube.it> To: "Ken Ara" <feedreader@yahoo.com> Cc: <zope@zope.org> Sent: Tuesday, November 30, 2004 3:58 PM Subject: Re: [Zope] ZopeXMLMethods installation woes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ken Ara wrote: | Once again, thank you Dieter and others who have had | the patience to help me learn. I searched a lot but | never did find out where one should install third | party Python modules. It is often mentioned that they | should be installed using the same Python that runs | Zope, but not where to install! | | I installed 4Suite and Py-XML into my SOFTWARE_HOME. | Now I can import the 4Suite modules from the command | line using Zope's python. | | But when I ran the tests that come with | ZopeXMLMethods, the product is still unable to import | the necessary modules. | | Maybe this is linked to the other, _new_ problem I | have:
The problem I suspect is that ZopeXMLMethod is not yet been ported to the 2.7.x series. Indeed, it uses something which was feasible in Zope 2.6.x, which is no more allowed in Zope 2.7.x
The problem is in the __init__.py inside ZopeXMLMethod, since it uses the methods dictionary to make the availableProcessors method globally avaialbe.
Try the enclosed patch... We had a similar problem with our product PAFlow (look in the archives)
Regards Marco
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBrIqDXhfyAQQVoaIRArSWAJ0e+jF6DdhJRG7LFCol9LnBwxwRIQCdF8n4 2FKmoHUWY5HRUvv+8LdVlwg= =+tmm -----END PGP SIGNATURE-----
--------------------------------------------------------------------------- - ----
--- __init__.py.dist 2004-11-30 15:55:06.000000000 +0100 +++ __init__.py 2004-11-30 15:56:05.000000000 +0100 @@ -18,6 +18,7 @@
from XSLTMethod import manage_addXSLTMethod, \ manage_addXSLTMethodForm, addXSLTMethod +from XSLTMethod.XSLTMethod import availableProcessors from CacheManager import manage_addXMLMethodCacheManagerForm, \ manage_addXMLMethodCacheManager, addXMLMethodCacheManager
@@ -41,7 +42,8 @@ context.registerClass( CacheManager.CacheManager, constructors = (
manage_addXMLMethodCacheManagerForm,
manage_addXMLMethodCacheManager,
-
addXMLMethodCacheManager),
+ addXMLMethodCacheManager, + availableProcessors), icon = 'www/cache.gif' )
context.registerHelp()
--------------------------------------------------------------------------- - ----
_______________________________________________ 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 )
Marco, Thank you for the patch. I was unable to apply it using the patch program, but carefully copied the changes to __init__.py. Then I tried to refresh the ZopeXMLMethods product. This failed... here's the traceback: An exception occurred during the last refresh. Exception type: ImportError Exception value: No module named XSLTMethod Traceback (most recent call last): File "/usr/local/www/Zope/lib/python/App/RefreshFuncs.py", line 182, in performSafeRefresh if not performRefresh(jar, productid): File "/usr/local/www/Zope/lib/python/App/RefreshFuncs.py", line 169, in performRefresh Application.reimport_product(productid) File "/usr/local/www/Zope/lib/python/OFS/Application.py", line 863, in reimport_product raise_exc=1, log_exc=0) File "/usr/local/www/Zope/lib/python/OFS/Application.py", line 660, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/www/Zope/Products/ZopeXMLMethods/__init__.py", line 21, in ? from XSLTMethod.XSLTMethod import availableProcessors ImportError: No module named XSLTMethod --- I think it is not complaining about the XSLTMethod.py module itself, rather the XSLTMethod class within the XSLTMethod module. If so, what is the proper incantation? Ken --- Marco Bizzarri <m.bizzarri@icube.it> wrote:
The problem I suspect is that ZopeXMLMethod is not yet been ported to the 2.7.x series. Indeed, it uses something which was feasible in Zope 2.6.x, which is no more allowed in Zope 2.7.x
The problem is in the __init__.py inside ZopeXMLMethod, since it uses the methods dictionary to make the availableProcessors method globally avaialbe.
Try the enclosed patch... We had a similar problem with our product PAFlow (look in the archives)
Regards Marco
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBrIqDXhfyAQQVoaIRArSWAJ0e+jF6DdhJRG7LFCol9LnBwxwRIQCdF8n4
2FKmoHUWY5HRUvv+8LdVlwg= =+tmm -----END PGP SIGNATURE-----
--- __init__.py.dist 2004-11-30 15:55:06.000000000 +0100 +++ __init__.py 2004-11-30 15:56:05.000000000 +0100 @@ -18,6 +18,7 @@
from XSLTMethod import manage_addXSLTMethod, \ manage_addXSLTMethodForm, addXSLTMethod +from XSLTMethod.XSLTMethod import availableProcessors from CacheManager import manage_addXMLMethodCacheManagerForm, \ manage_addXMLMethodCacheManager, addXMLMethodCacheManager
@@ -41,7 +42,8 @@ context.registerClass( CacheManager.CacheManager, constructors = ( manage_addXMLMethodCacheManagerForm,
manage_addXMLMethodCacheManager, - addXMLMethodCacheManager), + addXMLMethodCacheManager, + availableProcessors), icon = 'www/cache.gif' )
context.registerHelp()
__________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com
On Wednesday 01 December 2004 15:37, Ken Ara wrote:
Marco,
Thank you for the patch. I was unable to apply it using the patch program, but carefully copied the changes to __init__.py. Then I tried to refresh the ZopeXMLMethods product. This failed... here's the traceback: Exactly the same happened to me. regards garry An exception occurred during the last refresh. Exception type: ImportError Exception value: No module named XSLTMethod
Traceback (most recent call last): File "/usr/local/www/Zope/lib/python/App/RefreshFuncs.py", line 182, in performSafeRefresh if not performRefresh(jar, productid): File "/usr/local/www/Zope/lib/python/App/RefreshFuncs.py", line 169, in performRefresh Application.reimport_product(productid) File "/usr/local/www/Zope/lib/python/OFS/Application.py", line 863, in reimport_product raise_exc=1, log_exc=0) File "/usr/local/www/Zope/lib/python/OFS/Application.py", line 660, in import_product product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/www/Zope/Products/ZopeXMLMethods/__init__.py", line 21, in ? from XSLTMethod.XSLTMethod import availableProcessors ImportError: No module named XSLTMethod --- I think it is not complaining about the XSLTMethod.py module itself, rather the XSLTMethod class within the XSLTMethod module. If so, what is the proper incantation?
Ken
--- Marco Bizzarri <m.bizzarri@icube.it> wrote:
The problem I suspect is that ZopeXMLMethod is not yet been ported to the 2.7.x series. Indeed, it uses something which was feasible in Zope 2.6.x, which is no more allowed in Zope 2.7.x
The problem is in the __init__.py inside ZopeXMLMethod, since it uses the methods dictionary to make the availableProcessors method globally avaialbe.
Try the enclosed patch... We had a similar problem with our product PAFlow (look in the archives)
Regards Marco
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBrIqDXhfyAQQVoaIRArSWAJ0e+jF6DdhJRG7LFCol9LnBwxwRIQCdF8n4
2FKmoHUWY5HRUvv+8LdVlwg= =+tmm -----END PGP SIGNATURE-----
--- __init__.py.dist 2004-11-30 15:55:06.000000000
+0100 +++ __init__.py 2004-11-30 15:56:05.000000000 +0100 @@ -18,6 +18,7 @@
from XSLTMethod import manage_addXSLTMethod, \ manage_addXSLTMethodForm, addXSLTMethod +from XSLTMethod.XSLTMethod import availableProcessors from CacheManager import manage_addXMLMethodCacheManagerForm, \ manage_addXMLMethodCacheManager, addXMLMethodCacheManager
@@ -41,7 +42,8 @@ context.registerClass( CacheManager.CacheManager, constructors = ( manage_addXMLMethodCacheManagerForm,
manage_addXMLMethodCacheManager, - addXMLMethodCacheManager), + addXMLMethodCacheManager, + availableProcessors), icon = 'www/cache.gif' )
context.registerHelp()
__________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.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 )
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ken Ara wrote: | Marco, | | Thank you for the patch. I was unable to apply it | using the patch program, but carefully copied the | changes to __init__.py. Then I tried to refresh the | ZopeXMLMethods product. This failed... here's the | traceback: | | An exception occurred during the last refresh. | Exception type: ImportError | Exception value: No module named XSLTMethod | | Traceback (most recent call last): | File | "/usr/local/www/Zope/lib/python/App/RefreshFuncs.py", | line 182, in performSafeRefresh | if not performRefresh(jar, productid): | File | "/usr/local/www/Zope/lib/python/App/RefreshFuncs.py", | line 169, in performRefresh | Application.reimport_product(productid) | File | "/usr/local/www/Zope/lib/python/OFS/Application.py", | line 863, in reimport_product | raise_exc=1, log_exc=0) | File | "/usr/local/www/Zope/lib/python/OFS/Application.py", | line 660, in import_product | product=__import__(pname, global_dict, | global_dict, silly) | File | "/usr/local/www/Zope/Products/ZopeXMLMethods/__init__.py", | line 21, in ? | from XSLTMethod.XSLTMethod import | availableProcessors | ImportError: No module named XSLTMethod | --- | I think it is not complaining about the XSLTMethod.py | module itself, rather the XSLTMethod class within the | XSLTMethod module. If so, what is the proper | incantation? | | Ken Ok, I did not read the code... neither I tried the patch (I have not installed the ZopeXMLMethods module). It looks like it is trying to import from inside the XSLTMethod class inside the XSLTMethod module... What you could try to do (I do not have the time at the moment) is to extract the availableProcessors method from the XSLTMethod class, and put it at the module level (the code is not dependent on the self object). Then redefine the import so that it becomes: from XSLTMethod import availableProcessors Then you should be able to use it. I do not know if there is any other references in the code, use grep. Regards Marco -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBrtmiXhfyAQQVoaIRAjqRAJwIUFOxBXghsLyuApdHarlbCiM4UgCcCN25 qYEG349ZO/9VgAciRicpkcE= =4qTM -----END PGP SIGNATURE-----
participants (10)
-
Andreas Jung -
baptiste Ancey -
Dieter Maurer -
garry saddington -
Kees de Brabander -
Ken Ara -
Marco Bizzarri -
Paul Winkler -
Robert Rottermann -
Tino Wildenhain