472,333 Members | 1,052 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

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 2905
bartonc
6,596 Expert 4TB
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
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 Expert Mod 2GB
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
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,...
3
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
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...
2
by: avenpace | last post by:
Hi, I had error in my script like "sudden EOF in MultiFile readline()" Why such error occur
1
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...
0
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...
5
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. ...
2
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...
0
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...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.