473,809 Members | 2,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Have I broken my installation?

Hi folks,

I have an old Linux box that I am messing about with Python on. The
RedHat installed version is 1.5 something so I have built & installed
2.2.2 in /opt/python.

I've started trying to play with XML and ran into an error when
attempting to parse a document:
Traceback (most recent call last):
File "/mnt/hugedisk/share/MattsMovableTyp e/stb/stb.cgi", line 90, in ?
documentElem = parse( rssFile )
File "/opt/python/lib/python2.2/xml/dom/minidom.py", line 962, in parse
return _doparse(pulldo m.parse, args, kwargs)
File "/opt/python/lib/python2.2/xml/dom/minidom.py", line 953, in _doparse
events = apply(func, args, kwargs)
File "/opt/python/lib/python2.2/xml/dom/pulldom.py", line 328, in parse
parser = xml.sax.make_pa rser()
File "/opt/python/lib/python2.2/xml/sax/__init__.py", line 93, in make_parser
raise SAXReaderNotAva ilable("No parsers found", None)
xml.sax._excep tions.SAXReader NotAvailable: No parsers found
Googling around it seems like I needed to build XML support when I
built Python. I'm not sure what I should have done differently when I
built in order to make that happen. The other option on offer
appeared to be installing PyXML.

I duly downloaded PyXML 0.8.2 and installed it (again into /opt/python
using --prefix).

Now instead of the previous error I get a different problem entirely:
Traceback (most recent call last):
File "/mnt/hugedisk/share/MattsMovableTyp e/stb/stb.cgi", line 18, in ?
from xml.dom.minidom import parse, Document
File "./xml.py", line 2, in ?
from xml.dom.minidom import parse
ImportError: No module named dom.minidom


I'm pretty sure I had a module dom.minidom before as it is the import
statement that is raising the exception and it didn't prior to
installing PyXML, I was previously calling parse() and Document().

So did I make a mistake installing PyXML? Can anyone advise me on
what my next steps should be?

Many thanks,

Matt

---
Systems Engineer, Hipbone(EMEA) Ltd.
3000 Hillswood drive, Chertsey, Surrey, KT16 0RS
Tel: 44-1932-895902 Mob: 44-7980-237-380
Jul 18 '05
10 5620
Matt Mower wrote:
I made one small adjustment, specifying the --prefix=/opt/python
option to put PyXML in the same directory as Python 2.2.
Well, that's your problem right there. Note the symptomology of what
Martin von Loewis asked you to test -- it prints different things for
your interactive usage and the CGI script.
My entire Python developing experience runs to about an afternoons
worth so I have no idea why PyXML isn't working or isn't being found.
That's because the problem you're running into here is a difference in
environment between you running the program in your interactive shell
and Apache running it as nobody. It's a general Unix issue, not
specific to Python.
Can you suggest anything?


The problem is that you've installed PyXML in /opt/python, which is a
nonstandard place -- though that isn't in and of itself wrong if you
know what you're doing. You've obviously adjusted your interactive
environment to look in /opt/python, since you're running the scripts
without problems locally, but CGI scripts do not run in your
environment, and so aren't seeing what you've installed in /opt/python,
since that is a nonstandard place. For a quick remedy, add something
like this:

import sys
sys.path.append ('/opt/python')

to the top of your script. A more permanent solution would involve
adding it to /usr/local/lib/pythonX.Y/site.py.

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \ Every astronaut who goes up knows the risks he or she faces.
\__/ Sally Ride
Jul 18 '05 #11

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

Similar topics

0
1608
by: Nick | last post by:
I am using the original relaese (1.0?) of Visual Studio.NET. Whenever I search for a help topic, all the results come back with a title of "a". Yes, just the letter "a". I can click on them, and they actually lead to relevent topics, it's just the title in the search results window that's messed up. I tried re-installing the help files, but that didn't solve anything. I did another installation on a different machine and it works fine,...
0
1470
by: Michał Januszczyk | last post by:
Hello. I've got the following problem: I created a windows installer project that installs my application. The application works with some files. I want to include some example files with the installation package. These files by no means are critical for the application itself. They are included only to help application user to get aquaintanced with the app.
15
6227
by: Jake | last post by:
Not sure if this can be done with javascript but I would like to find a way to detect if an image is missing and replace it with a default image instead of the dreaded RED X showing up. So - Is Javascript the way? Or should I look elesewhere? Thanks in Advance!
87
5371
by: Sony Music CDs install Malware | last post by:
Whether you are a web surfer or a C++ developer, if you use Windows be cautioned about SONY music CDs. They contain 'viewer' type software that is actually a trojan horse for a "rootkit". The licence agreement gives no indication whatsoever that the 'viewer' software contains the implementation of a nasty near-impossible to remove rootkit software. http://www.sysinternals.com/blog/2005/10/sony-rootkits-and-digital-rights.html ...
1
12642
by: ImageAnalyst | last post by:
Yay!!! They fixed this for VS2005. You can now set the default installation to be "Everyone" instead of "Just Me" and you can control whether you even want those radio button installed in your Setup program. >From the Documentation http://msdn2.microsoft.com/en-us/library/5f981xa1.aspx =========================================================== "The InstallAllUsers property for a deployment project determines whether an application is...
13
2165
by: Steven Bethard | last post by:
Jean-Paul Calderone <exarkun@divmod.comwrote: Interesting. Could you give a few illustrations of this? (I didn't run into the same problem at all, so I'm curious.) Steve
9
2501
by: Endless Story | last post by:
My last version of Python was 2.4, running smoothly on XP with path c: \Python24 - no need even to include this path in PATH; everything worked as it's supposed to at the command line. Just installed Python 2.5, after uninstalling 2.4 (and also 2.3 which had lingered). Now if I open a shell in Windows Python is not available! Here are the symptoms: - If I open a shell using "Command line here" with XP Powertools, then enter "python"...
2
1625
by: Bruno Rezende | last post by:
Hi, I think I've broken my python installation (don't know how). All the packages that are under 'lib' in python installation doesn't work the way expected: Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'dom'
5
3779
by: Larry Bates | last post by:
Info: Python version: ActivePython 2.5.1.1 Platform: Windows I wanted to install BeautifulSoup today for a small project and decided to use easy_install. I can install other packages just fine. Unfortunately I get the following error from BeautifulSoup installation attempt: C:\Python25\Lib\SITE-P~1>easy_install BeautifulSoup
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7660
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.