From: <oli...@ma...> - 2005-11-22 09:03:39
|
Hi there, I experienced some strange errors when I distributed our application to= some colleagues in Denmark. The application uses: Python 2.4 wxPython 2.5.5.1 numeric 23.7 matplotlib 0.83.1 The GUI was designed with Boa Constructor 0.4.4. The exe-file was compi= led with py2exe 0.6.3 A student who works for me has made an .exe-file of the application tha= t worked fine on our PC's in Norway (I tested it on around 10 PC's, both Windows XP and 2000). Last week we had a meeting with some colleagues f= rom Denmark who brought their laptops and installed the application. Installation went fine for all of them, but the application would not r= un on 3 out of 9 laptops (both Windows XP and 2000). I understand that the error has something to do with matplotlib and wit= h Unicode displaying the letter '=E6', but I can't find out what the reas= on is for this. Strange thing is, we use the same letter here in Norway. My g= uess i that it has someting to do with language settings on these 3 PC's, bu= t I am not sure about this. Anyone an idea what went wrong here? Thanks a lot in advance! Oliver Here is the error report and the setup.py for py2exe Error report: Traceback (most recent call last): File "PanelCheck.py", line 4, in ? File "PanelCheck_GUI.pyc", line 9, in ? File "Line_Plot.pyc", line 3, in ? File "Plot_Setup.pyc", line 9, in ? File "matplotlib\backends\backend_wxagg.pyc", line 18, in ? File "matplotlib\backends\backend_agg.pyc", line 82, in ? File "matplotlib\figure.pyc", line 3, in ? File "matplotlib\axes.pyc", line 14, in ? File "matplotlib\axis.pyc", line 25, in ? File "matplotlib\font_manager.pyc", line 993, in ? File "matplotlib\font_manager.pyc", line 837, in __init__ File "matplotlib\font_manager.pyc", line 830, in rebuild File "matplotlib\font_manager.pyc", line 456, in createFontDict UnicodeEncodeError: 'ascii' codec can't encode character u'\xe6' in position 15: ordinal not in range(128) Traceback (most recent call last): File "PanelCheck.py", line 4, in ? File "PanelCheck_GUI.pyc", line 9, in ? File "Line_Plot.pyc", line 3, in ? File "Plot_Setup.pyc", line 9, in ? File "matplotlib\backends\backend_wxagg.pyc", line 18, in ? File "matplotlib\backends\backend_agg.pyc", line 82, in ? File "matplotlib\figure.pyc", line 3, in ? File "matplotlib\axes.pyc", line 14, in ? File "matplotlib\axis.pyc", line 25, in ? File "matplotlib\font_manager.pyc", line 993, in ? File "matplotlib\font_manager.pyc", line 837, in __init__ File "matplotlib\font_manager.pyc", line 830, in rebuild File "matplotlib\font_manager.pyc", line 456, in createFontDict UnicodeEncodeError: 'ascii' codec can't encode character u'\xe6' in position 15: ordinal not in range(128) setup.py for py2exe: # setup.py from distutils.core import setup import py2exe import glob import sys class Target: def __init__(self, **kw): self.__dict__.update(kw) # for the versioninfo resources self.version =3D "1.22" self.company_name =3D "Matforsk " self.copyright =3D "no copyright" self.name =3D "PanelCheck" manifest_template =3D ''' <?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?> <assembly xmlns=3D"urn:schemas-microsoft-com:asm.v1" manifestVersion=3D= "1.0"> <assemblyIdentity version=3D"5.0.0.0" processorArchitecture=3D"x86" name=3D"%(prog)s" type=3D"win32" /> <description>%(prog)s Program</description> <dependency> <dependentAssembly> <assemblyIdentity type=3D"win32" name=3D"Microsoft.Windows.Common-Controls" version=3D"6.0.0.0" processorArchitecture=3D"X86" publicKeyToken=3D"6595b64144ccf1df" language=3D"*" /> </dependentAssembly> </dependency> </assembly> ''' RT_MANIFEST =3D 24 PanelCheck_files =3D [ "About.py", "Correlation_Plot.py", "FileOpen_Summary.py", "Line_Plot.py", "LoadData.py", "PanelCheck.py", "PanelCheck_GUI.py", "pca.py", "Plot_Setup.py", "fig.ico", "about.png", "logo.png", "help.chm", "Tucker1_Plot.py", "Eggshell_Plot.py", "pmse_Plot.py", "SplashScreen.py", "pstat.py", "stats.py" ] data =3D glob.glob(r'C:\Program Files\Python24\share\matplotlib\*') data.append(r'C:\Program Files\Python24\share\matplotlib\matplotlibrc')= PanelCheck =3D Target( script =3D "PanelCheck.py", other_resources =3D [(RT_MANIFEST, 1, manifest_template % dict(prog=3D"PanelCheck"))], icon_resources =3D [(1, "fig.ico")], #data_files =3D [("matplotlibdata", data)], dest_base =3D "PanelCheck") setup( data_files =3D [("matplotlibdata", data), ("",["fig.ico", "help= .chm", "about.png", "logo.png"]), ("code", PanelCheck_files)], options =3D {"py2exe": { "packages": ["encodings", "pytz", "numar= ray", "matplotlib.numerix.random_array"], "bundle_files": 3, "ascii": 1} }, zipfile =3D None, name=3D'PanelCheck', version=3D'1.22', description=3D'Data Analysis Tool', author=3D'Henning Risvik and Oliver Tomic', url=3D'http://www.matforsk.no/PanelCheck', windows =3D [PanelCheck], ) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Oliver Tomic, Dr. Scient, Research Scientist MATFORSK - Norwegian Food Research Institute Osloveien 1 1430 =C5s Norway Tel.: 0047 6497 0252 Fax: 0047 6497 0333 Mob.: 0047 9574 6167 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D http://www.matforsk.no http://www.matforsk.no/panelcheck= |