473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py" ,
line 310, in RunScript
exec codeObject in __main__.__dict__
File "C:\My Documents\Programs\Python\SDV.py", line 2, in ?
from chaco.wxplot import *
File "C:\PYTHON23\lib\site-packages\chaco\wxplot.py", line 17, in ?
from wxplot_window import PlotWindow, PlotTraitSheet
File "C:\PYTHON23\lib\site-packages\chaco\wxplot_window.py", line 5,
in ?
from wxplot_window_agg import *
File "C:\PYTHON23\lib\site-packages\chaco\wxplot_window_agg.py", line
27, in
from kiva.agg import CAP_BUTT
File "C:\PYTHON23\lib\site-packages\kiva\agg\__init__.py", line 1, in
?
from agg import *
File "C:\PYTHON23\lib\site-packages\kiva\agg\agg.py", line 734, in ?
import freetype
File "C:\PYTHON23\lib\site-packages\freetype\__init__.py", line 6, in
?
from freetype import FreeType
File "C:\PYTHON23\lib\site-packages\freetype\freetype.py", line 10,
in ?
from font_lookup import default_font_info
File "C:\PYTHON23\lib\site-packages\freetype\font_lookup.py", line
24, in ?
font_dirs.append(os.path.join(os.environ[ 'systemroot' ],'fonts'))
File "C:\PYTHON23\lib\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 1717
si*****@scientist.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\lib\site-packages\freetype\font_lookup.py", line
24, in ?
font_dirs.append(os.path.join(os.environ[ 'systemroot' ],'fonts'))
File "C:\PYTHON23\lib\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:\\windows")

(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
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...
1
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)...
0
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...
2
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...
1
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...
0
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...
1
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...
0
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...
4
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.