473,508 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Execution Error (importing packages, setting sys.path) [solved]

6 New Member
Hi,

When i am trying to execute python module as shown below it it running sucessfully on some machine but on others m/c it is showing following error msg:

C:\Python24>python subcontentitem.py d:\base\cnt139459a.xml
Traceback (most recent call last):
File "subcontentitem.py", line 1, in ?
import sys, os, re, random, Ft.Xml.Domlette
ImportError: No module named Ft.Xml.Domlette

Please do the needful ASAP.

Thanks and Regards,
Arun Jain
Oct 24 '06 #1
3 2961
bartonc
6,596 Recognized Expert Expert
Hi,

When i am trying to execute python module as shown below it it running sucessfully on some machine but on others m/c it is showing following error msg:

C:\Python24>python subcontentitem.py d:\base\cnt139459a.xml
Traceback (most recent call last):
File "subcontentitem.py", line 1, in ?
import sys, os, re, random, Ft.Xml.Domlette
ImportError: No module named Ft.Xml.Domlette

Please do the needful ASAP.

Thanks and Regards,
Arun Jain
On a machine which succeeds at running type
import sys
print sys.path
in the python command line.

In one of the directories in that list there is probably a directory tree
"Ft/Xml/" with the Domlette file in it.

If this tree exists on the machines on which running fails, you can move it to match the other installations or add the path to the Ft directory to sys.path in one of several way:
1. sys.path.append(r"absolute/file/path")
2. edit $PYTHONPATH environment variable to include the path
3. create a textfile (say ftpath).pth with the path in it and store it somewhere where python looks by default (say) sitepackages
Oct 24 '06 #2
jainarun
6 New Member
Hi Bartonc ,

Thanks for ur quick reply.But i don't know Python language.I have to only parse the python file which is sent by client.I am not understanding what do u want to say? can u tell me in simple language what i have to do to resolve this problem.

Your quick reply will be highly appriciated.

Thanks and Regards,
Arun
Oct 25 '06 #3
bvdet
2,851 Recognized Expert Moderator Specialist
Hi Bartonc ,

Thanks for ur quick reply.But i don't know Python language.I have to only parse the python file which is sent by client.I am not understanding what do u want to say? can u tell me in simple language what i have to do to resolve this problem.

Your quick reply will be highly appriciated.

Thanks and Regards,
Arun
On the machine that fails to execute, make sure folders Ft\Xml\ exist on the system path and that the file 'Domlette.py?' exists in that directory. A file named __init__.py must also exist in that directory.

HTH,
BV
Oct 25 '06 #4

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

Similar topics

4
5355
by: Active8 | last post by:
I did this once and can't remember how <blush> so I read the reportlab user guid. It says to unzip the reportlab archive - this is on w2k, BTW, with Python23 - to a directory and make a file...
3
1760
by: Olivier Noblanc ATOUSOFT | last post by:
Hello, When i want to import a .py fire from another subdirectory i make import inc/setupxml but that make me an error message.
10
6842
by: greenb | last post by:
Our asp.net web app uses a .NET component (DLL) in the bin directory to call several stored procedures back to back to perform updates. They don't return any data. Sometimes the total execution...
2
1896
by: avenpace | last post by:
Hi, I had error in my script like "sudden EOF in MultiFile readline()" Why such error occur
1
9200
by: shalini jain | last post by:
Hi all, I am very new to java and have a very limited knowledge about this. i am stuck at one problem which is really druving me crazy.. The problem is : I have written a code wherein I...
0
1508
by: Martin P. Hellwig | last post by:
Hello all, I had some troubles in the past how to arrange my packages and modules, because I usually don't develop my stuff in the Lib\site-packages directory I have some troubles when importing...
5
1959
by: sawilla | last post by:
First, I'm new to Python. I'm getting and error when I run Python 2.5.2 as a regular user in Vista but not when I run Python as an administrator. For example, if I type "import numpy" after I...
2
2034
by: Aaron Scott | last post by:
I've installed mod_python, and everything seems to be working, but it fails when I try to import another file into the file that's actually producing the output. I have these lines at the top of...
0
1086
by: Fredrik Lundh | last post by:
mercado mercado wrote: if you already have two different versions of the script, what stops you from making changes to them? cannot you just insert the appropriate directory in sys.path...
0
7229
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,...
0
7398
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...
1
7061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5637
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,...
1
5057
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...
0
4716
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...
0
3208
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...
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.