[python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Kurt Munson
I have been using pywin32 successfully for years to control Excel. Now, suddenly I get errors executing the same code that has run previously. My python code controls Excel like this: import win32com.client xl = win32com.client.DispatchEx(Excel.Application) xl.DisplayAlerts = 0 xl.visible = 0

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Tim Golden
On 17/07/2012 14:51, Kurt Munson wrote: I have been using pywin32 successfully for years to control Excel. Now, suddenly I get errors executing the same code that has run previously. [...] The last line(‘xl.visible = 0’) now causes an error: [...] This error goes away if I use xl.Visible

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Tim Golden
[cc-ing the list back in so you get the benefit of more and greater intelligences...] On 17/07/2012 15:20, Kurt Munson wrote: I don't get it: I haven't made any changes to that Dispatch call in months! My code worked for months with the existing Dispatch method, up through yesterday

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Kurt Munson
dispatch would remove case sensitivity. -Kurt -Original Message- From: Tim Golden [mailto:m...@timgolden.me.uk] Sent: Tuesday, July 17, 2012 10:27 AM To: Kurt Munson; python-win32@python.org Subject: Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Tim Golden
On 17/07/2012 16:05, Kurt Munson wrote: Dunno exactly what you mean by what's your Dispatch code look like. Well pretty much what you posted, in fact :) Incidentally, I tried changing the dispatch line to use dynamic dispatch using this code: code xl =

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Graham Bloice
-Original Message- Subject: Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously On 17/07/2012 16:05, Kurt Munson wrote: Dunno exactly what you mean by what's your Dispatch code look like. Well pretty much what you posted

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Kurt Munson
previously -Original Message- Subject: Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously On 17/07/2012 16:05, Kurt Munson wrote: Dunno exactly what you mean by what's your Dispatch code look like. Well pretty much what you

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Kurt Munson
@python.org Subject: Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously -Original Message- From: Kurt Munson [mailto:kurt.mun...@hbmncode.com] Sent: 17 July 2012 16:46 To: Graham Bloice; python-win32@python.org Subject: RE: [python-win32

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Graham Bloice
stating 'object has no attribute' - and the code worked previously Graham, Thanks for the suggestion - deleting the \win32com\gen_py .py and .pyc files solved the problem! It appears that my dispatch (whether static or dynamic) was using old generated py instead of regenerating. Why would

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Tim Roberts
Kurt Munson wrote: Thanks for the suggestion - deleting the \win32com\gen_py .py and .pyc files solved the problem! No, not really. What you did was HIDE the problem. The PROBLEM is that you are simply using the wrong name for that property. The property name is Visible with a capital V,

Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously

2012-07-17 Thread Kurt Munson
, July 17, 2012 12:31 PM To: Python-Win32 List Subject: Re: [python-win32] new Pywin32 errors stating 'object has no attribute' - and the code worked previously Kurt Munson wrote: Thanks for the suggestion - deleting the \win32com\gen_py .py and .pyc files solved the problem! No, not really. What