[python-win32] __getattr__ Error

Jannis ioannis.michailidis at web.de
Wed Mar 20 12:19:32 EDT 2024


Hello Harald,


Thanks for your prompt answer.


makepy.py is in the environment, BUT does not run -> pythoncom is missing


VS Code has the following suggestions



Is there an obvious one to run? The first two don't work..


Best Regards

ioannis



Am 18.03.2024 um 12:43 schrieb haraldarminmassa at gmail.com:
> Hi Jannis,
>
> a good way forward: create less-dynamic COM-bindings by using makepy.py
> (it is part of your win32com-client installation, but linked here for
> the dokumentation)
>
>
> https://github.com/SublimeText/Pywin32/blob/master/lib/x32/win32com/client/makepy.py
>
> With makepy py you can create a (very very large) python-file, which
> includes rather static bindings to
> reachable exposed attributes and methods.
>
> You can then grep or strg+f through that file for "HybridShapes" ...
> maybe it is just spelled differently.
>
> Using COM things for > 2 decades, apps run much smoother using the
> makepy created files than dynamic dispatch
>
> cheers
>
> Harald
>
>
> On Sun, Mar 17, 2024 at 7:35 PM Jannis via python-win32
> <python-win32 at python.org> wrote:
>
>     Hello together,
>
>
>     I am trying to automate a point cloud creation out of CATParts in
>     CATIA.
>     The win32com client can access CATIA documents, but NOT methods and
>     attributes in the parts. I get the following error:
>
>
>     File
>     "C:\Users\th80im\source\repos\PythonPointCloudCreation\PythonPointCloudCreation\PythonPointCloudCreation\py37_env_1\lib\site-packages\win32com\client\dynamic.py",
>     line 638, in __getattr__
>          raise AttributeError("%s.%s" % (self._username_, attr))
>     AttributeError: <unknown>.HybridShapes
>
>
>     I guess, there is something wrong with the registering of CATIA,
>     or the
>     installation of the client? Or am I looking in the wrong direction?
>
>
>     Thank you & Best Regards
>
>     ioannis
>
>     _______________________________________________
>     python-win32 mailing list
>     python-win32 at python.org
>     https://mail.python.org/mailman/listinfo/python-win32
>
>
>
> --
> --
> Harald Armin Massa
> Spielberger Straße 49
> 70435 Stuttgart
> 0173/9409607
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/python-win32/attachments/20240320/8d07badc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 580P2VE8hk4Bvw7q.png
Type: image/png
Size: 117202 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/python-win32/attachments/20240320/8d07badc/attachment-0001.png>


More information about the python-win32 mailing list