win32com problems with Visible property

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rebecca Taylor

    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
  • Peter Hansen

    #2
    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...

    -Peter

    Comment

    • David Rushby

      #3
      Re: win32com problems with Visible property

      "Rebecca Taylor" <jrbexbox@hotma il.com> 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?

      See:



      13


      Comment

      • Bob Gailer

        #4
        Re: win32com problems with Visible property

        At 04:07 PM 9/2/2003 -0400, David Rushby wrote:
        [color=blue]
        >"Rebecca Taylor" <jrbexbox@hotma il.com> 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'"

        Bob Gailer
        bgailer@alum.rp i.edu
        303 442 2625


        ---
        Outgoing mail is certified Virus Free.
        Checked by AVG anti-virus system (http://www.grisoft.com).
        Version: 6.0.506 / Virus Database: 303 - Release Date: 8/1/2003

        Comment

        Working...