473,893 Members | 1,869 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>pyt hon subcontentitem. py d:\base\cnt1394 59a.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 2983
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>pyt hon subcontentitem. py d:\base\cnt1394 59a.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
5396
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 called reportlab.pth in the pythod dir. The only line in this file is supposed to be the path to the reportlib dir. Then I'm instructed to open the ... ok I'll close and reopen ... the python cmd line interpreter and type import reportlab
3
1784
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
6887
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 time can take 2-3 minutes, but even though I have set the executionTimeout in web.config to a high number of seconds (2400), the request will still time out after 90 seconds. The user sees a Request timed out error. The app logs a ThreadAborted...
2
1914
by: avenpace | last post by:
Hi, I had error in my script like "sudden EOF in MultiFile readline()" Why such error occur
1
9232
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 have included some external packages e.g: jdom 1.0 and self created package. When I am running my code in eclipse it works fine because I think it itself picks up the path of jars as well as package but while through command prompt its giving me...
0
1534
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 depending modules that are in 'sibling' directories. Like in the following scenario: pkg_root\ -__init__ - common\ - - __init__
5
1978
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 launch python from an adminstrator-privileged command window it loads fine. However, from a regular-user command window I get: Traceback (most recent call last): File "<stdin>", line 1, in <module>
2
2056
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 index.py: from mod_python import apache from storylab import * .... and in the directory where index.py resides (/htdocs/python/), I have a directory called "storylab". Inside that directory is __init__.py. When I try to execute...
0
1102
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 the first thing you do in the scripts? e.g.
0
9832
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
10840
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...
1
10929
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10469
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7175
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
5859
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
6066
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4684
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 we have to send another system
3
3293
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.