473,225 Members | 1,298 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,225 software developers and data experts.

Problem with mod_python and 4Suite

Hi all,

I'm trying to build a demonstration website using mod_python and
4Suite to show how we could transform XML documents into HTML with
XSLT. Here is a piece of code that causes it to blow up:

# import the xml/xslt stuff here
from xml.xslt.Processor import Processor

# create a xslt processor
xsltProc = Processor()

# transform the xml text into html
xsltProc.appendStylesheetUri(filepath)
html = xsltProc.runString(xmltext)

Here is the trace I get in the browser when I run this code:

Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line
285, in HandlerDispatch
result = object(req)

File "/usr/lib/python2.2/site-packages/mod_python/publisher.py",
line 175, in handler
result = apply(object, (), args)

File "/data/cs/handlers/gme.py", line 61, in search
return _transform(xmldata, filepath)

File "/data/cs/handlers/gme.py", line 105, in _transform
from xml.xslt.Processor import Processor

File "/usr/lib/python2.2/site-packages/_xmlplus/xslt/__init__.py",
line 19, in ?
pyxml_required = version.StrictVersion(Ft.__pyxml_version__)

AttributeError: 'module' object has no attribute '__pyxml_version__'
Does anyone have any suggestions, or just even general advice on using
4Suite with mod_python? I'd be very interested to hear them.

I'm running this on a Dell 2550 server with RedHat linux 8.0, Python
2.2.1, PyXML 0.8.3 and 4Suite 1.0.a*

Thanks in advance for your help.

Doug Farrell
Jul 18 '05 #1
2 1809
Doug Farrell a écrit :
Hi all,

I'm trying to build a demonstration website using mod_python and
4Suite to show how we could transform XML documents into HTML with
XSLT. Here is a piece of code that causes it to blow up:

# import the xml/xslt stuff here
from xml.xslt.Processor import Processor


This actually imports the broken xslt engine in pyxml, and not 4suite's.
This engine is known not to work.

You want to import Ft.Xml.Xslt to use 4suite xslt engine in the 1.0
branch. You will also have to adapt your code to the new apis introduced
since 4suite 0.12, please see the documentation.

Try asking on the 4Suite mailing list (links to the list available from
http://4suite.org/)
--
Alexandre Fayolle
LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
Développement logiciel avancé - Intelligence Artificielle - Formations
Jul 18 '05 #2
Alexandre Fayolle <al*@fayauffre.org> wrote in message news:<sl****************@largo.fayauffre.org>...
Doug Farrell a écrit :
Hi all,

I'm trying to build a demonstration website using mod_python and
4Suite to show how we could transform XML documents into HTML with
XSLT. Here is a piece of code that causes it to blow up:

# import the xml/xslt stuff here
from xml.xslt.Processor import Processor


This actually imports the broken xslt engine in pyxml, and not 4suite's.
This engine is known not to work.

You want to import Ft.Xml.Xslt to use 4suite xslt engine in the 1.0
branch. You will also have to adapt your code to the new apis introduced
since 4suite 0.12, please see the documentation.

Try asking on the 4Suite mailing list (links to the list available from
http://4suite.org/)


Alexandre,

Thanks for your help and suggestions, I will implement them and see
how that works for me. I'll also post back to this thread to let you
know of my success (or failure <g>).

Again, thanks for for your feedback,
Doug Farrell
Scholastic, Inc.
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ws Wang | last post by:
MySQLdb is working fine at command line, however when I tried to use it with mod_python, it give me a "server not initialized" error. This is working fine: ----------------------- testmy.py...
1
by: py.adriano | last post by:
Hi folks... I'm getting a weird problem while loading psp module from mod_python. It only happen somethimes, and I just can't figure out why. I saw other threads in other lists over the net, but...
1
by: neha | last post by:
hi, i m trying to integrate python with apache on linux.For this i m using mod_python. I dont see any problem with the versions of python,apache and mod_python i m using. the versions i m using...
0
by: Manuzhai | last post by:
Hello there, I have this weird problem with a mod_python application. Recently I installed ElementTree and cElementTree through ez_setup.py, even though they were already installed normally...
1
by: boney | last post by:
hello All, I am totally unknown to python language.. i need to install mod_python to embed python interpreter with the Apache server, in order to use Trac with Apache Web Server i am using...
1
by: wadacom | last post by:
I'm sorry to take your time for newbie problems but I've been searching what to do about the problem with my apache server I have. I work with ubuntu dapperdrake I put the last apache server on it...
3
by: rmompo | last post by:
Hi, im new at Python and i'm having problems putting it online. this is the plataform: Windows XP Professional SP2 Apache/2.2.4 (Win32)...
3
by: Pradnyesh Sawant | last post by:
Hello, I have a small program which does 'import hashlib'. This program runs fine with python2.5. But when I try running the same program through mod_python, I get the error: 'ImportError: No...
3
by: Lawrence D'Oliveiro | last post by:
In message <mailman.109.1216158151.922.python-list@python.org>, Cyril Bazin wrote: What's the error message? This should be in Apache's error_log file.
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.