[Zope] ZopeXMLMethods installation woes

Marco Bizzarri m.bizzarri at icube.it
Thu Dec 2 04:00:18 EST 2004


-----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-----


More information about the Zope mailing list