You might need to patch a file in pywin32.

C:\Python26\Lib\site-packages\win32com\client\__init__.py

The first function should be commented out, only the protoype and return should remain:

def __WrapDispatch(dispatch, userName = None, resultCLSID = None, typeinfo = None, \
                  UnicodeToString=None, clsctx = pythoncom.CLSCTX_SERVER,
                  WrapperClass = None):
  """
    Helper function to return a makepy generated class for a CLSID if it exists,
    otherwise cope by using CDispatch.
  """
  #assert UnicodeToString is None, "this is deprecated and will go away"
  #if resultCLSID is None:
    #try:
      #typeinfo = dispatch.GetTypeInfo()
      #if typeinfo is not None: # Some objects return NULL, some raise exceptions...
        #resultCLSID = str(typeinfo.GetTypeAttr()[0])
    #except (pythoncom.com_error, AttributeError):
      #pass
  #if resultCLSID is not None:
    #import gencache
    ## Attempt to load generated module support
    ## This may load the module, and make it available
    #klass = gencache.GetClassForCLSID(resultCLSID)
    #if klass is not None:
      #return klass(dispatch)

  # Return a "dynamic" object - best we can do!
  if WrapperClass is None: WrapperClass = CDispatch
  return dynamic.Dispatch(dispatch, userName, WrapperClass, typeinfo, clsctx=clsctx)

Maybe this might work.
On 06/11/2012 3:57 PM, Ben Beckett wrote:

Hi all

 I have a few plugin that require Python, They used to work before I a fresh version of windows7 64bit.

 Plugins like Gear mbfeathers require Python am getting this error:

 #   File "C:\Program Files\Autodesk\Softimage 2012 SP1\Application\python\Lib\site-packages\win32com\client\dynamic.py", line 538, in __setattr__

#     self._oleobj_.Invoke(entry.dispid, 0, invoke_type, 0, value)

# COM Error: Unexpected failure. - [line 39 in C:\Users\Ben\Autodesk\Softimage_2012_SP1\Addons\mbFeatherTools\Application\Plugins\mb_FeatherToolsPlugin.py]

 

So How I installed python and the files i used would be like this:

 1)     I downloaded the file Python-2.6.8 from the python site, and extracted to the root of my c drive. Could not find a .exe version

2)  I  added the python folder (e.g. C:\ Python-2.6.8) to the PATH environment variable, system properties/Advanced tab/ environment variable

 In the System variables section

 PYTHONPATH         C:\ Python-2.6.8

3) in stall pywin32-212.win-64-py2.6

 4)switch xsi to script python and tick off use xsi python

 5) restart

 6) open xsi  and all should work or not in my case!!!!

Is this the right way are these the right files can any one spread any light on this

In my plugin list there are still some scripts with red warning triangles

All the best Ben 

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2221 / Virus Database: 2441/5377 - Release Date: 11/06/12


Reply via email to