[Tutor] Wading through traceback output
I have a script that I used to be quite proud of, up until today it was working great. Basically it reads in a directory tree of spreadsheets, extracts info from them then makes a new spreadsheet to output the info to. The spreadsheets are xls files so it uses xlrd and xlwt to manage the data extraction and spreadsheet creation. Today when I ran it (after a hiatus of about 3 months) I got this output: Traceback (most recent call last): File "./cttOverviewMain.0.03.2011.py", line 294, in monthData(searchList) File "./cttOverviewMain.0.03.2011.py", line 261, in monthData writeMonthlyHeader(writeSheet) File "./cttOverviewMain.0.03.2011.py", line 183, in writeMonthlyHeader sh.write(7,10,"# Locations",xlwt.easyxf('font: bold True')) File "/usr/local/lib/python2.6/dist-packages/xlwt/Worksheet.py", line 1003, in write self.row(r).write(c, label, style) File "/usr/local/lib/python2.6/dist-packages/xlwt/Row.py", line 227, in write style_index = self.__parent_wb.add_style(style) File "/usr/local/lib/python2.6/dist-packages/xlwt/Workbook.py", line 303, in add_style return self.__styles.add(style) File "/usr/local/lib/python2.6/dist-packages/xlwt/Style.py", line 90, in add return self._add_style(style)[1] File "/usr/local/lib/python2.6/dist-packages/xlwt/Style.py", line 149, in _add_style raise ValueError("More than 4094 XFs (styles)") ValueError: More than 4094 XFs (styles) I don't understand this very well at all - any pointers are appreciated. I think what it is saying is that there is a problem with my Python libraries but this is not a problem I have ever seen before. Is it possible the 2.6 libraries were updated in the hiatus time causing this problem? If so any ideas on how I can investigate fixing this are appreciated. thomas ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wading through traceback output
On 26/12/11 11:42, Thomas C. Hicks wrote: Given it was working before and not now the obvious question is what has changed? It looks like you are on a Linux box so do you have automatic updates switched on? Or do you always just accept the recommendation to update? In which case try looking at the modification dates of the library files Also has the verion of Excel used to create the files changed? It looks like the point that the program leaves your code is here: File "./cttOverviewMain.0.03.2011.py", line 183, in writeMonthlyHeader sh.write(7,10,"# Locations",xlwt.easyxf('font: bold True')) So that points the finger at the xlwt module. If it has been updated has the format of that call changed - to a dictionary/tuple of values for example? These are all guesses but might give you a starting point. Incidentally cttOverviewMain.0.03.2011.py seems like a bizarre name for a file? I assume that's the date or somesuch? What is the thinking behind that? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] PYTHONPATH (Mac OS X)
>Simply that python is saying it cannot find the file. >So it is probably in a different folder to the one in which the program is >running. You need to provide a valid path to the file, Those files are in the same folder: /Users/Username/Python_modules/ I don't want to write a full path here: if __name__ == '__main__': print test('lengthcounter_lutz.py') How to add this directory to the search path? >So what is it doing exactly that seems wrong? >What input? What output? What did you expect? I have a slightly different copy of this file: def countLines(name): file = open(name.__file__) return len(file.readlines()) def countChars(name): return len(open(name.__file__).read()) def test(name): return "Lines:", countLines(name), "Chars:", countChars(name) if __name__ == '__main__': import lengthcounter print test(lengthcounter) I've tried to run it in the interactive shell: import lengthcounter as lc lc.test(lengthcounter) And here is the output: ('Lines:', 5, 'Chars:', 885) But that code has 13 lines and 317 characters according to the Emacs' counter. Where is an error? Cheers. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] PYTHONPATH (Mac OS X)
On 12/26/2011 07:23 AM, Stayvoid wrote: Simply that python is saying it cannot find the file. So it is probably in a different folder to the one in which the program is running. You need to provide a valid path to the file, Those files are in the same folder: /Users/Username/Python_modules/ I don't want to write a full path here: if __name__ == '__main__': print test('lengthcounter_lutz.py') How to add this directory to the search path? Once again, there is no search path for the open() function. You can either supply an absolute name (eg. starting with leading slash), or you can supply a path relative to the current directory. If you're not sure what the current directory is, you can fetch it with something like: import os print os.path.abspath(os.curdir) But if you're running the script from the terminal window, it should simply be the current directory for that window. If you're running it from some other shell, you'd have to consult that shell's docs. -- DaveA ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wading through traceback output :p:
On Mon, 26 Dec 2011 07:10:45 -0500 Alan Gauld wrote: > On 26/12/11 11:42, Thomas C. Hicks wrote: > > Given it was working before and not now the obvious question is what > has changed? It looks like you are on a Linux box so do you have > automatic updates switched on? Or do you always just accept the > recommendation to update? > > In which case try looking at the modification dates of the > library files > > Also has the verion of Excel used to create the files changed? > > It looks like the point that the program leaves your code is here: > > >File "./cttOverviewMain.0.03.2011.py", line 183, in > > writeMonthlyHeader sh.write(7,10,"# Locations",xlwt.easyxf('font: > > bold True')) > > So that points the finger at the xlwt module. If it has been updated > has the format of that call changed - to a dictionary/tuple of values > for example? > > These are all guesses but might give you a starting point. > > > Incidentally cttOverviewMain.0.03.2011.py seems like a bizarre > name for a file? I assume that's the date or somesuch? What is the > thinking behind that? > Thanks so much for the input Alan, guesses on your part are far better than the ignorance on my part. I do get automatic updates (though xlwt is not part of that, OpenOffice and its xls writing is), will have to look at that. Also appreciate the thoughts about the file name. This is my first big project and I still have much to learn. If you can point me to a discussion of file naming when there are multiple files involved in a project I am game to do some reading! thomas ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wading through traceback output :p:
On 12/26/2011 11:52 PM, Thomas C. Hicks wrote: On Mon, 26 Dec 2011 07:10:45 -0500 Alan Gauld wrote: On 26/12/11 11:42, Thomas C. Hicks wrote: Given it was working before and not now the obvious question is what has changed? It looks like you are on a Linux box so do you have automatic updates switched on? Or do you always just accept the recommendation to update? In which case try looking at the modification dates of the library files Also has the verion of Excel used to create the files changed? It looks like the point that the program leaves your code is here: File "./cttOverviewMain.0.03.2011.py", line 183, in writeMonthlyHeader sh.write(7,10,"# Locations",xlwt.easyxf('font: bold True')) So that points the finger at the xlwt module. If it has been updated has the format of that call changed - to a dictionary/tuple of values for example? These are all guesses but might give you a starting point. Incidentally cttOverviewMain.0.03.2011.py seems like a bizarre name for a file? I assume that's the date or somesuch? What is the thinking behind that? Thanks so much for the input Alan, guesses on your part are far better than the ignorance on my part. I do get automatic updates (though xlwt is not part of that, OpenOffice and its xls writing is), will have to look at that. Many package managers keeps a history of what packages are installed/updated/removed. You might want to use those to find if OpenOffice or some other libraries had been updated since the last time the script worked. Also appreciate the thoughts about the file name. This is my first big project and I still have much to learn. If you can point me to a discussion of file naming when there are multiple files involved in a project I am game to do some reading! Use version control, it will relieve you of versioning headache. Nowadays it's pretty easy to setup a DVCS like mercurial or git even for small projects. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wading through traceback output
On Mon, Dec 26, 2011 at 7:10 AM, Alan Gauld wrote: > On 26/12/11 11:42, Thomas C. Hicks wrote: > > Given it was working before and not now the obvious question is what has > changed? It looks like you are on a Linux box so do you have automatic > updates switched on? Or do you always just accept the recommendation to > update? > > In which case try looking at the modification dates of the > library files > > Also has the verion of Excel used to create the files changed? > > It looks like the point that the program leaves your code is here: > > >> File "./cttOverviewMain.0.03.2011.py", line 183, in writeMonthlyHeader >> sh.write(7,10,"# Locations",xlwt.easyxf('font: bold True')) > > > So that points the finger at the xlwt module. If it has been updated has the > format of that call changed - to a dictionary/tuple of values for example? > > These are all guesses but might give you a starting point. > > > Incidentally cttOverviewMain.0.03.2011.py seems like a bizarre > name for a file? I assume that's the date or somesuch? What is the thinking > behind that? > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor It may be that there is something different about your data with this recent run. I googled your error message and came up with this link: http://groups.google.com/group/python-excel/browse_thread/thread/c717ad00c7acc848 I'm not familiar with the package, but ValueError: More than 4094 XFs (styles) has lots of links on google. To test my guess, would it be possible for you to set up your application to run it on files that it successfully worked on before? If it won't work on them, then I'd guess that a module may have updated. But if it does work, then you may have some condition in your new data that exercises your program in a way it hasn't be exercised before that raises the exception. The link I showed contains this little snippet: - On 27/09/2010 00:46, Keyton Weissinger wrote: > if current_value_is_date: > s = XFStyle() > s.num_format_str = 'M/D/YY' > export_sheet.write(row_idx, col_idx, > current_value, s) ...and we have a winner. Create the style *once* in your outermost part of the function and re-used it, rather than creating a new style each and every time you write a date cell... - I don't know if this situation applies to you, but maybe it will give you a clue -- Joel Goldstick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] question about pywin32
Does pywin32 provide a module for AES encryption algorithm ? The description of some module in pywin32 document is so simple that there is not introduction about the function of the function. For example, "CryptProtectData" function in module win32crypt. daedae11___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] question about pywin32
On 12/27/2011 12:18 AM, daedae11 wrote: Does pywin32 provide a module for AES encryption algorithm ? The description of some module in pywin32 document is so simple that there is not introduction about the function of the function. For example, "CryptProtectData" function in module win32crypt. It is not the intent of pywin32 to document win32 functions. For each of pywin32 function, there is a corresponding C function with the same name in MSDN, for example, for CryptProtectData: http://msdn.microsoft.com/en-us/library/windows/desktop/aa380261%28v=vs.85%29.aspx ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] question about pywin32
On 12/27/2011 02:58 AM, Lie Ryan wrote: On 12/27/2011 12:18 AM, daedae11 wrote: Does pywin32 provide a module for AES encryption algorithm ? The description of some module in pywin32 document is so simple that there is not introduction about the function of the function. For example, "CryptProtectData" function in module win32crypt. It is not the intent of pywin32 to document win32 functions. For each of pywin32 function, there is a corresponding C function with the same name in MSDN, for example, for CryptProtectData: http://msdn.microsoft.com/en-us/library/windows/desktop/aa380261%28v=vs.85%29.aspx a small correction: "...there is a corresponding C function with the same name in win32 library, which is documented in MSDN..." ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wading through traceback output :p:
On 26/12/11 12:52, Thomas C. Hicks wrote: Also appreciate the thoughts about the file name. This is my first big project and I still have much to learn. If you can point me to a discussion of file naming when there are multiple files involved in a project I am game to do some reading! When dealing with multiple files the only p[roblem tends to e if you have duplicate names. In that case create separate folders (packages in Python) and use namespaces to kep them separate. If you have multiple versions of the same file it's probably better to keep separate folders for each project version. But better still is to use a version control tool (which does the same thing virtually with a friendly UI/CLI and copes with multiple versions etc). These can range from simple file based RCS to full project based control. Most folks these days tenmd to go with project based control. CVS, SVN. GIT, Mercurial are the big names for freeware. [MS SourceSafe, IBM ClearCase and AidedeCamp are the big commercial players - but they cost big bucks(apart from SourceSafe)] SVN and Mercurial would be my suggestion, GUI front ends exist for both and both have packages for most Linux distros. They both have web sites with tutorials, but whiole there are oodles of options etc there are only a few commands you need for normal use, especially for a single user: create, check out, check in, fork, diff, merge should cover it. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] PYTHONPATH (Mac OS X)
On 26/12/11 12:23, Stayvoid wrote: Simply that python is saying it cannot find the file. So it is probably in a different folder ... Those files are in the same folder: /Users/Username/Python_modules/ And is that where you are running the code from? That is the critical factor. By just providing the filename Python assumes its in the same folder that you ran the program from. If you run it from somewhere else you *must* provide the full (or relative() path to the file. There is no option for Python to search for it. I don't want to write a full path here: if __name__ == '__main__': print test('lengthcounter_lutz.py') You don't have any option. You either type in the full path or you get the user to tell you in some way - either with a prompt or via an input argument. I have a slightly different copy of this file: def countLines(name): file = open(name.__file__) return len(file.readlines()) def countChars(name): return len(open(name.__file__).read()) def test(name): return "Lines:", countLines(name), "Chars:", countChars(name) if __name__ == '__main__': import lengthcounter print test(lengthcounter) I've tried to run it in the interactive shell: import lengthcounter as lc lc.test(lengthcounter) Are you sure it is your version that's being picked up? Try renaming it to something guaranteed to be unique. See if the results are the same. Also I would expect the prompt to complain because you are passing lengthcounter as a name to the test function, but you imported lengthcounter as lc, so python should not know about lengthcounter unless you had already imported it (or another file?) eg. >>> import random as r >>> random.__file__ Traceback (most recent call last): File "", line 1, in NameError: name 'random' is not defined >>> Try starting a fresh interpreter session and repeating the test. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] question about pywin32
On Mon, Dec 26, 2011 at 5:18 AM, daedae11 wrote: > ** > Does pywin32 provide a module for AES encryption algorithm ? > > The description of some module in pywin32 document is so simple that there > is not introduction about the function of the function. > For example, "CryptProtectData" function in module win32crypt. > Lie Ryan has already covered this pretty well, but I thought I'd re-state for clarification: pywin32 itself does not provide modules for ANYTHING. pywin32 is just a convenience wrapper for functions that already exist in the win32 library; without pywin it's a horrible task to call win32 functions from Python. Since pywin doesn't provide the functions, it also doesn't provide documentation. For that, you go to the people who actually wrote the functions: Microsoft. In fact, it might make more sense to turn your search around: look at MSDN _first_ to see what functions are available, and then look at the pywin docs to see how to call them. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Wading through traceback output :p:
On Mon, Dec 26, 2011 at 12:04 PM, Alan Gauld wrote: > On 26/12/11 12:52, Thomas C. Hicks wrote: > >> Also appreciate the thoughts about the file name. This is my first big >> project and I still have much to learn. If you can point me to a >> discussion of file naming when there are multiple files involved in a >> project I am game to do some reading! > > > When dealing with multiple files the only p[roblem tends to e if you have > duplicate names. In that case create separate folders (packages in Python) > and use namespaces to kep them separate. > > If you have multiple versions of the same file it's probably better to keep > separate folders for each project version. But better still is to use a > version control tool (which does the same thing virtually with a friendly > UI/CLI and copes with multiple versions etc). > > These can range from simple file based RCS to full project based control. > Most folks these days tenmd to go with project based > control. CVS, SVN. GIT, Mercurial are the big names for freeware. > [MS SourceSafe, IBM ClearCase and AidedeCamp are the big commercial players > - but they cost big bucks(apart from SourceSafe)] > > SVN and Mercurial would be my suggestion, GUI front ends exist for both and > both have packages for most Linux distros. They both have web sites with > tutorials, but whiole there are oodles of options etc there are only a few > commands you need for normal use, especially for a single user: > > create, > check out, > check in, > fork, > diff, > merge > > should cover it. > > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor I sent this earlier but it doesn't look like it went through: It may be that there is something different about your data with this recent run. I googled your error message and came up with this link: http://groups.google.com/group/python-excel/browse_thread/thread/c717ad00c7acc848 I'm not familiar with the package, but ValueError: More than 4094 XFs (styles) has lots of links on google. To test my guess, would it be possible for you to set up your application to run it on files that it successfully worked on before? If it won't work on them, then I'd guess that a module may have updated. But if it does work, then you may have some condition in your new data that exercises your program in a way it hasn't be exercised before that raises the exception. The link I showed contains this little snippet: - On 27/09/2010 00:46, Keyton Weissinger wrote: > if current_value_is_date: > s = XFStyle() > s.num_format_str = 'M/D/YY' > export_sheet.write(row_idx, col_idx, > current_value, s) ...and we have a winner. Create the style *once* in your outermost part of the function and re-used it, rather than creating a new style each and every time you write a date cell... - I don't know if this situation applies to you, but maybe it will give you a clue -- Joel Goldstick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] A few Python Mysteries [Reset]
On 12/24/2011 11:24 AM, Alan Gauld wrote: On 24/12/11 18:58, Wayne Watson wrote: Yikes. I gave the permissions for .idlerc above. The problem is with recent-files.py. IOError: [Errno 13] Permission denied: 'C:\\Users\\Wayne\\.idlerc\\recent-files.lst' Can you open it in Notepad from the same command prompt? ie. is it just idle that can't open it, or is it any program? Opens with Notepad and jEdit from the menu off a py file. I'm suspicious of the "Unknown Account(S-1-21-lots of digits)" seen in Properties' Security tab. It seems bizarre and has read and read&execute properties only. "Unknown User" exits for txt and jpg files, so it's not isolated to py. Perhaps there's an ownership problem; however, Owner (recent-files.lst) is: solarblast\Wayne. That's me. I'm looking at the General tab of .idlerc. Attributes Read-only check box is blue. If I click on it, it goes white. If I click again, it shows the check mark. Eventually, I get back to blue. I'm now looking at Properties-General for recent-files.lst, and Read -only check box is white. Presently, I do not know if this amounts to anything. I see recent-files.lst is openable with Word. I see mydir_math.py is opened with python.exe!!?? True of other py files. -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet CE 1955 October 20 07:53:32.6 UT -- "The Date" The mystery unfolds. Web Page: ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] A few Python Mysteries [SOLVED]
Excellent strategy!! It worked. I just examined the properties for each .idlerc, and noticed that the troublesome one was created in Feb 4,2010. Probably with Python 2.5.2. I don't know why or necessarily whether new installs shouldn't have changed the folder or recreated it. Thanks to all who followed this long perplexing thread. On 12/24/2011 8:08 PM, Lie Ryan wrote: On 12/25/2011 06:24 AM, Alan Gauld wrote: On 24/12/11 18:58, Wayne Watson wrote: Yikes. I gave the permissions for .idlerc above. The problem is with recent-files.py. IOError: [Errno 13] Permission denied: 'C:\\Users\\Wayne\\.idlerc\\recent-files.lst' Can you open it in Notepad from the same command prompt? ie. is it just idle that can't open it, or is it any program? also, try deleting the whole folder (or just in case, move the folder somewhere else), IDLE should create a new folder and config files, hopefully with the correct permission. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet CE 1955 October 20 07:53:32.6 UT -- "The Date" The mystery unfolds. Web Page: ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Which libraries for Python 2.5.2
Yes, that's a reasonable request, and I expected it, but hoped it might be apparent from what I revealed. Why? It's on another PC this happened, and getting the messages of it is not easily done, but today I have time, so soon I will post the details. On 12/24/2011 10:49 AM, Hugo Arts wrote: On Sat, Dec 24, 2011 at 6:37 PM, Wayne Watson wrote: I'm trying to restore Python 2.5.2 on an old PC for a particular application that uses it from 4-5 years ago. According to the latest manual on it, the following should be installed. python-2.5.2.msi PIL-1.1.6.win32-py2.5.exe numpy-1.1.0-win32-superpack-python2.5.exe matplotlib-0.98.1.win32-py2.5.exe When I install them, and try to run the app program, Sentinel.py, some part of matplotlib complains (error msgs) and the program quits. If we are to give any kind of useful advice at all, we're going to need to see those error messages. The program begins with: from Tkinter import * from numpy import * import Image import ImageChops import ImageTk import time import binascii import tkMessageBox import tkSimpleDialog from pylab import plot, xlabel, ylabel, title, show, xticks, bar I tried numpy-1.2.0 and matplotlib-0.98.3 and had the same difficulty. What are wiser choices? This question is based on the assumption that version mismatch is the cause of your problems. Even though that might be correct, it is not an assumption you can safely make. In general, when asking questions here (and anywhere really, imho) you should try to provide as much factual information and as little conjecture as you can. Hugo -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet CE 1955 October 20 07:53:32.6 UT -- "The Date" The mystery unfolds. Web Page: ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Which libraries for Python 2.5.2
Here's the traceback. Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. IDLE 1.2.2 No Subprocess >>> Traceback (most recent call last): File "C:\Sentinel\Sent_user-20080716.py", line 16, in from pylab import plot, xlabel, ylabel, title, show, xticks, bar File "C:\Python25\lib\site-packages\pylab.py", line 1, in from matplotlib.pylab import * File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line 206, in from matplotlib import mpl # pulls in most modules File "C:\Python25\lib\site-packages\matplotlib\mpl.py", line 1, in from matplotlib import artist File "C:\Python25\lib\site-packages\matplotlib\artist.py", line 4, in from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath File "C:\Python25\lib\site-packages\matplotlib\transforms.py", line 34, in from matplotlib._path import affine_transform ImportError: DLL load failed: The specified module could not be found. >>> On 12/26/2011 11:44 AM, Wayne Watson wrote: Yes, that's a reasonable request, and I expected it, but hoped it might be apparent from what I revealed. Why? It's on another PC this happened, and getting the messages of it is not easily done, but today I have time, so soon I will post the details. On 12/24/2011 10:49 AM, Hugo Arts wrote: On Sat, Dec 24, 2011 at 6:37 PM, Wayne Watson wrote: I'm trying to restore Python 2.5.2 on an old PC for a particular application that uses it from 4-5 years ago. According to the latest manual on it, the following should be installed. python-2.5.2.msi PIL-1.1.6.win32-py2.5.exe numpy-1.1.0-win32-superpack-python2.5.exe matplotlib-0.98.1.win32-py2.5.exe When I install them, and try to run the app program, Sentinel.py, some part of matplotlib complains (error msgs) and the program quits. If we are to give any kind of useful advice at all, we're going to need to see those error messages. The program begins with: from Tkinter import * from numpy import * import Image import ImageChops import ImageTk import time import binascii import tkMessageBox import tkSimpleDialog from pylab import plot, xlabel, ylabel, title, show, xticks, bar I tried numpy-1.2.0 and matplotlib-0.98.3 and had the same difficulty. What are wiser choices? This question is based on the assumption that version mismatch is the cause of your problems. Even though that might be correct, it is not an assumption you can safely make. In general, when asking questions here (and anywhere really, imho) you should try to provide as much factual information and as little conjecture as you can. Hugo -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet CE 1955 October 20 07:53:32.6 UT -- "The Date" The mystery unfolds. Web Page: ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] A few Python Mysteries [Reset]
On 26/12/11 18:57, Wayne Watson wrote: IOError: [Errno 13] Permission denied: 'C:\\Users\\Wayne\\.idlerc\\recent-files.lst' Can you open it in Notepad from the same command prompt? Opens with Notepad and jEdit from the menu off a py file. That's not what I asked. Does it open in Notepad from the same command prompt where you try to run python? Or indeed any command prompt: C:\WINDOWS> notepad C:\Users\Wayne\.idlerc\recent-files.lst I see recent-files.lst is openable with Word. Thats nort a surprise, its probably just a text file, so Windows could associate just about anything! I see mydir_math.py is opened with python.exe!!?? > True of other py files. Which is what you'd expect, after all the default behaviour for a python script should surely be to get executed by Python? What else would you expect? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] A few Python Mysteries [Reset]
Regardless, the problem is solved. See my [SOLVED] msg I put up this morning (USA). It's in response to Lie Ryan. However, I have no real idea how is was caused. On 12/26/2011 1:28 PM, Alan Gauld wrote: On 26/12/11 18:57, Wayne Watson wrote: IOError: [Errno 13] Permission denied: 'C:\\Users\\Wayne\\.idlerc\\recent-files.lst' Can you open it in Notepad from the same command prompt? Opens with Notepad and jEdit from the menu off a py file. That's not what I asked. Does it open in Notepad from the same command prompt where you try to run python? Or indeed any command prompt: C:\WINDOWS> notepad C:\Users\Wayne\.idlerc\recent-files.lst I see recent-files.lst is openable with Word. Thats nort a surprise, its probably just a text file, so Windows could associate just about anything! I see mydir_math.py is opened with python.exe!!?? > True of other py files. Which is what you'd expect, after all the default behaviour for a python script should surely be to get executed by Python? What else would you expect? -- Wayne Watson (Watson Adventures, Prop., Nevada City, CA) (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet CE 1955 October 20 07:53:32.6 UT -- "The Date" The mystery unfolds. Web Page: ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor