DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.73k stars 632 forks source link

Python 3 incorrectly reports `__iter__` atribute. #11869

Open JacobSmall opened 3 years ago

JacobSmall commented 3 years ago

Dynamo version

2.11

Operating system

Win 10

What did you do?

Ran this graph (remove the .txt extension), which passes a single item of various data types into both the Python 2 and Python 3 engine, to test if the object contains an __iter__ attribute. Python Iter attr issue.dyn.txt

What did you expect to see?

Consistent results in Python 2 and Python 3, showing a 'false' result for most code.

What did you see instead?

Incorrect results for the Python 3 engine for strings and geometry, as shown in this gif:
Python __Iter__ attr issue

github-actions[bot] commented 3 years ago

Thank you for submitting the issue to us. We are sorry to see you get stuck with your workflow. While waiting for our team member to respond, please feel free to browse our forum at https://forum.dynamobim.com/ for more Dynamo related information.

mjkkirschner commented 3 years ago

Hey @JacobSmall thanks for testing and filing this - I think this is fixed in pythonNet 3 - https://github.com/pythonnet/pythonnet/pull/1241

which is not released yet and will take us a bunch of work to move to - BUT this fix look tiny, we should be able to just port this to our 2.5 fork I think.