473,624 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WinXP vs. Win98

I use Python 2.3.3 (Enthought edition) with wxPython and it is
installed on both WinXP and Win98. On Win98 machine I have the
following error:
------------------------------------------------------------------------
Traceback (most recent call last):
File
"C:\PYTHON23\Li b\site-packages\python win\pywin\frame work\scriptutil s.py",
line 310, in RunScript
exec codeObject in __main__.__dict __
File "C:\My Documents\Progr ams\Python\SDV. py", line 2, in ?
from chaco.wxplot import *
File "C:\PYTHON23\li b\site-packages\chaco\ wxplot.py", line 17, in ?
from wxplot_window import PlotWindow, PlotTraitSheet
File "C:\PYTHON23\li b\site-packages\chaco\ wxplot_window.p y", line 5,
in ?
from wxplot_window_a gg import *
File "C:\PYTHON23\li b\site-packages\chaco\ wxplot_window_a gg.py", line
27, in
from kiva.agg import CAP_BUTT
File "C:\PYTHON23\li b\site-packages\kiva\a gg\__init__.py" , line 1, in
?
from agg import *
File "C:\PYTHON23\li b\site-packages\kiva\a gg\agg.py", line 734, in ?
import freetype
File "C:\PYTHON23\li b\site-packages\freety pe\__init__.py" , line 6, in
?
from freetype import FreeType
File "C:\PYTHON23\li b\site-packages\freety pe\freetype.py" , line 10,
in ?
from font_lookup import default_font_in fo
File "C:\PYTHON23\li b\site-packages\freety pe\font_lookup. py", line
24, in ?
font_dirs.appen d(os.path.join( os.environ[ 'systemroot' ],'fonts'))
File "C:\PYTHON23\li b\os.py", line 417, in __getitem__
return self.data[key.upper()]
KeyError: 'SYSTEMROOT'

-----------------------------------------------------------------------
Hovewer running very the same script on WinXP machine I have no
problems at all. What's wrong? Kiva package (as well as others) is
installed properly. Where to dig?

AS

Oct 26 '05 #1
3 1729
si*****@scienti st.com wrote:
I use Python 2.3.3 (Enthought edition) with wxPython and it is
installed on both WinXP and Win98. On Win98 machine I have the
following error: File "C:\PYTHON23\li b\site-packages\freety pe\font_lookup. py", line
24, in ?
font_dirs.appen d(os.path.join( os.environ[ 'systemroot' ],'fonts'))
File "C:\PYTHON23\li b\os.py", line 417, in __getitem__
return self.data[key.upper()]
KeyError: 'SYSTEMROOT'
Hovewer running very the same script on WinXP machine I have no
problems at all. What's wrong? Kiva package (as well as others) is
installed properly. Where to dig?


Windows XP has SystemDrive and SystemRoot environment variables,
while Windows 98 don't seem to have them.

a quick workaround is to set the SystemRoot environment by hand (it should
point to the Windows system directory; usually c:\windows. iirc, you have to
edit AUTOEXEC.BAT or run the MSCONFIG utility to set them).

alternatively, you can add the following fix to your application code:

import os
os.environ["SystemRoot "] = os.environ.get( "windir", "c:\\window s")

(put it *before* the wxplot import code)

a better fix is to make the freetype font_lookup code a bit more robust.

</F>

Oct 26 '05 #2
Thanks a lot! I have set the environment variable and now it runs just
fine!

Oct 26 '05 #3
Thanks a lot! I have set the environment variable and now it runs just
fine!

AS

Oct 26 '05 #4

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

Similar topics

0
2064
by: W i l l | last post by:
I have Apache 2 parsing and serving PHP files just fine on my winXP box, however, when I try to add some mysql database functionality I get a warning that looks like this: Fatal error: Call to undefined function mysql_connect() in D:\SITES\mysql.php on line 3 I am able to connect to mysql via the terminal just fine. Due to the error "undefined function" I wonder if I set PHP up wrong or something. Any ideas?
1
1519
by: Robert | last post by:
I found the os.popen("AT /?") way .... however it works not on Win98 and the "Day" you enter at the AT are language dependent. (e.g. Mi(ttwoch) in german, We(dnesday) in english Windows versions) I need a solution work from Win98..WinXP most independent from internationalization etc. is there portable way - or at all a way to manipulate the Win98/ME scheduler ?
0
1125
by: Krunoslav Ostrouska | last post by:
ArrayList included in object is not saved at clippboard copy in Win98 (Clipboard.SetDataObject() and IDataObject.GetData()) ! In WinXP, framework calls GetObjectData() and constructor(SerializationInfo, StreamingContext) of ISerializable (class serialise it self), during IDataObject.GetData() call, and it works. In Win98 not! Why is it diferent in W98 and what can i do to make it work in W98 to? Thanks, Kruno
2
1379
by: Astra | last post by:
Hi All Probably way off the mark here, but I have IIS running on my WinXP machine and I thought I could host multiple domains over the old Win98 method where I could only have the one? All I can see at the moment is that I have a Default Web Site, which is associated to MyPC, and all I can create is virtual directories/folders within this default location. This means that instead of me being able to create the desired effect of:
1
2460
by: Donna | last post by:
I just upgraded my OS from 98 to XP. Have a db written in Acc97 that worked fine for years. Now, I can't open many of the forms etc, etc. I am not a programmer, but took a year or so to study Access and wrote a nice database for myself, so now of course, I am at a loss as to know what is going on. I had made a note to myself that when I switched from Win95 to Win98, I had to reload and repath several librarie files. I am assuming that...
0
1595
by: Macadair | last post by:
I develop mid-range multi-user applications for a large site. Currently Win98 and Office97 are the standards used however we are slowly moving to WinXP. Due to the site upgrade cost, we are staying with Office97 for a little longer. This means we will have Win98 and WinXP PC's running Access97. When I compile an Access97 application on a Win98 PC, the resultant .mde functions correctly on both Win98 and WinXP PC's running Access97....
1
1474
by: Jodi Wedll | last post by:
I am attempting to deploy my .Net Application from my WinXP development machine to production systems based upon WinNT and Win98. I believe that it is mostly working except for code relating to the error coding. I have error coding that warns the user of problems with the information supplied. I used "System.Windows.Forms.ErrorProvider" based error coding which flags the control with the problem data for the user. The app blows when...
0
923
by: _Doug | last post by:
WriteFile hangs when running serial (RS232) program on WinXP. Works okay on Win98. Breaking at the WriteFile (ThreadEntry...WriteFile) and then single stepping with debugger causes no exit from WriteFile and it goes immediately to another thread (App::InitInstance > DoModal > PumpMessage > page::OnTimer).
4
1323
by: Slasher186 | last post by:
Hi all, First of all, I'm sorry if I posted at the wrong section here, but I can't seem to find the VB 6.0 newsgroup ? I'm developing my apps with VB 6.0 sp5 installed on win xp. I have create an exe file that runs fine on both winxp and win2k. However, when I try to execute that file on win 98 machine, there are errors. This error may vary between "EOF or BOF expected.." or "Error 13, Type mismatch". I've tried over and over again to do...
0
8234
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
8172
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,...
1
8335
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
8474
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
7158
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
6110
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
4079
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
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1784
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.