From: Archana G. <arc...@gm...> - 2007-04-05 03:02:29
|
Hii, I get the following error. Traceback (most recent call last): File "trial.py", line 1, in ? File "pylab.pyo", line 1, in ? File "matplotlib\pylab.pyo", line 203, in ? File "matplotlib\axes.pyo", line 16, in ? File "matplotlib\axis.pyo", line 19, in ? File "matplotlib\patches.pyo", line 42, in ? File "matplotlib\patches.pyo", line 79, in Patch File "matplotlib\cbook.pyo", line 352, in dedent AttributeError: 'NoneType' object has no attribute 'splitlines' If I comment it out I am getting the error. I have installed the following: Python 2.4.4 http://www.python.org/download/releases/2.4.4/<https://webmailapp5.cc.utexas.edu/horde-2.2.9-assign/util/go.php?url=http%3A%2F%2Fwww.python.org%2Fdownload%2Freleases%2F2.4.4%2F&Horde=8f6e082f99784a0f28d75db1d492ba0f> wxPython runtime win32-unicode for Python 2.4 http://www.wxpython.org/download.php<https://webmailapp5.cc.utexas.edu/horde-2.2.9-assign/util/go.php?url=http%3A%2F%2Fwww.wxpython.org%2Fdownload.php&Horde=8f6e082f99784a0f28d75db1d492ba0f> matplotlib-0.90.0.win32-py2.4.exe http://sourceforge.net/project/showfiles.php?group_id=80706<https://webmailapp5.cc.utexas.edu/horde-2.2.9-assign/util/go.php?url=http%3A%2F%2Fsourceforge.net%2Fproject%2Fshowfiles.php%3Fgroup_id%3D80706&Horde=8f6e082f99784a0f28d75db1d492ba0f> numpy-1.0.1.win32-py2.4.exe http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103<https://webmailapp5.cc.utexas.edu/horde-2.2.9-assign/util/go.php?url=http%3A%2F%2Fsourceforge.net%2Fproject%2Fshowfiles.php%3Fgroup_id%3D1369%26package_id%3D175103&Horde=8f6e082f99784a0f28d75db1d492ba0f> setup.py is as follows. from distutils.core import setup import os from os.path import join import shutil import glob import py2exe from py2exe.build_exe import py2exe import sys import matplotlib mpdir, mpfiles = matplotlib.get_py2exe_datafiles() # cleanup dist and build directory first (for new py2exe version) if os.path.exists("dist/prog"): shutil.rmtree("dist/prog") if os.path.exists("dist/lib"): shutil.rmtree("dist/lib") if os.path.exists("build"): shutil.rmtree("build") # # # options for py2exe options = {"py2exe": {"compressed": 1, "optimize": 2, "packages": ["encodings", ## "kinterbasdb", "pytz", "matplotlib.numerix", ## "email", ## "numpy" ## "PIL", ], # "includes": "matplotlib.numerix.random_array", "excludes": ["MySQLdb", "Tkconstants", "Tkinter", "tcl", "orm.adapters.pgsql", "orm.adapters.mysql" ], "dll_excludes": ["tcl84.dll", "tk84.dll", "wxmsw26uh_vc.dll"] } } zipfile = r"lib\library.zip" setup( classifiers = ["Copyright:: your name", "Development Status :: 5 Stable", "Intended Audience :: End User", "License :: Shareware", "Operating System :: Microsoft :: Windows 2000", "Operating System :: Microsoft :: Windows XP", "Operating System :: Microsoft :: Windows 9x", "Programming Language :: Python, wxPython", "Topic :: Home Use" "Natural Language :: German", "Natural Language :: French", "Natural Language :: English"], # windows = [wx_emb], console = ['trial.py'], options = options, zipfile = zipfile, data_files = [("lib\\matplotlibdata", mpfiles), matplotlib.get_py2exe_datafiles() # if you don't use the lib option #### ("prog\\amaradata", amaradata), #### ("prog\\amaradata\\Schemata", amaraschemata), #### ("prog\\", python4dll) ] ) trial.py is as follows. from pylab import * x = xrange(10) plot(x) savefig("trial.png") Kindly help. thank you. Archana. My trial.py is as follows On 4/2/07, Werner F. Bruhin <wer...@fr...> wrote: > > Hi Archana, > > Archana Ganesan wrote: > > Hi, > > > > I tried following the instructions at the py2exe site and I have also > > uncommeneted and made it include the matplotlib.numerix package. Still > > it doesnt seem to work. Is there any other way of compiling it into an > > executable? > Did you try to compile the sample I enclosed the other day? Did that > work? If not what error are you getting. > > Are you using numpy or ? > > Provide a small sample (with no dependencies if possible) which does not > work for you with the corresponding setup.py. > > Werner > |