-
Notifications
You must be signed in to change notification settings - Fork 773
Description
A long while ago, @filmor created a script that could be used to enable accessing DynamicObjects from Python as a workaround for issue #72 . Since then, this has worked beautifully up to version 3.0.5 and seemed to be a mature solution, even without direct support for DLR types in pythonnet.
With version 3.1.0rc0, this approach stopped working. When trying to access a dynamic property, I get AttributeError: 'Class1' object has no attribute 'SomePropertyFromDynamicObject'. It seems like the injected __getattr__ function is not called.
Python 3.12, pythonnet 3.0.5 - working
Python 3.12, pythonnet 3.1.0rc0 - not working
Python 3.14, pythonnet 3.1.0rc0 - not working
I have attached a C# project and python script to reproduce the issue. Build the C# solution, then run the test_dynamic_access.py script. It tests the DynamicObject-based approach, as well as our own, simplified version of it (that also stopped working).
This feature is very important to us, so I hope that a fix is feasible. Let me know if I can do anything to support.