win32com problems with Visible property

I have been working with win32com on python for 2 years now. I
recently tried to modify an older script I had made which creates and
excel workbook, fills it with data and then graphs the data.

Nothing is working!
When I try to run it I get this error:

"Property '%s.%s' can not be set." % (self._username _, attr)
AttributeError: Property 'Excel.Applicat ion.visible' can not be set."

Does anyone know why this is happening? I can't figure out if windows
has changed or if win32all or the new python distribution is the
problem. Worse yet, I reinstalled my old versions of python and
win32all and that isn't working either!

Thanks in advance.
-rebecca

Tags: None Peter Hansen Jul 18 '05, 02:13 AM

Re: win32com problems with Visible property

Rebecca Taylor wrote:[color=blue]
>
> I have been working with win32com on python for 2 years now. I
> recently tried to modify an older script I had made which creates and
> excel workbook, fills it with data and then graphs the data.
>
> Nothing is working!
> When I try to run it I get this error:
>
> "Property '%s.%s' can not be set." % (self._username _, attr)
> AttributeError: Property 'Excel.Applicat ion.visible' can not be set."
>
> Does anyone know why this is happening? I can't figure out if windows
> has changed or if win32all or the new python distribution is the
> problem. Worse yet, I reinstalled my old versions of python and
> win32all and that isn't working either![/color]

I'm not sure what the problem is, but cutting and pasting the *actual*
traceback instead of retyping might help us find it, or at least would
help us trust everything you're saying. Not having 100% confidence
in a problem report (as in this case) tends to make one investigate
less intensely, I've found.

Comment

Post Cancel David Rushby Jul 18 '05, 02:13 AM

Re: win32com problems with Visible property

"Rebecca Taylor" wrote in message
news:f431a335.0 309020839.486b6 f92@posting.goo gle.com. [color=blue]
> I have been working with win32com on python for 2 years now. I
> recently tried to modify an older script I had made which creates and
> excel workbook, fills it with data and then graphs the data.
>
> Nothing is working!
> When I try to run it I get this error:
>
> "Property '%s.%s' can not be set." % (self._username _, attr)
> AttributeError: Property 'Excel.Applicat ion.visible' can not be set."
>
> Does anyone know why this is happening? I can't figure out if windows
> has changed or if win32all or the new python distribution is the
> problem. Worse yet, I reinstalled my old versions of python and
> win32all and that isn't working either![/color]

The property is named 'Visible', not 'visible'.

When makepy is run, COM identifiers become case-sensitive. Perhaps your old
installation of win32com hadn't been makepy-ified, but the new one has?

Comment

Post Cancel Bob Gailer Jul 18 '05, 02:16 AM

Re: win32com problems with Visible property

At 04:07 PM 9/2/2003 -0400, David Rushby wrote:
[color=blue]
>"Rebecca Taylor" wrote in message
>news:f431a335. 0309020839.486b 6f92@posting.go ogle.com. [color=green]
> > I have been working with win32com on python for 2 years now. I
> > recently tried to modify an older script I had made which creates and
> > excel workbook, fills it with data and then graphs the data.
> >
> > Nothing is working!
> > When I try to run it I get this error:
> >
> > "Property '%s.%s' can not be set." % (self._username _, attr)
> > AttributeError: Property 'Excel.Applicat ion.visible' can not be set."
> >
> > Does anyone know why this is happening? I can't figure out if windows
> > has changed or if win32all or the new python distribution is the
> > problem. Worse yet, I reinstalled my old versions of python and
> > win32all and that isn't working either![/color]
>
>The property is named 'Visible', not 'visible'.
>
>When makepy is run, COM identifiers become case-sensitive. Perhaps your old
>installation of win32com hadn't been makepy-ified, but the new one has?[/color]

I don't think this is the problem. If it were the OP would get an attribute
error. ". object has no attribute 'visible'"