-
-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ironpython 3.4: issue with enum when using its None
member ?
#1873
Comments
Could you write this import and test? from Autodesk.Revit.UI import TaskDialogResult |
It is what I did in steps |
Okay, I see. I found solution in dynamo wiki. |
Ah… Yes. Now I remember that I already encountered this issue on some of my CPython scripts. Thanks @dosymep It is an easy fix. As rpw have not been updated for more than 4 years maybe we should commit directly to pyRevit ? |
Hi, there is an IronPython3 doc about upgrading from ipy2 here |
there is also a method in coreutils for that: get_enum_none |
@CyrilWaechter I did merge you PR but you may want to check if @nodatasheet link does the job |
The coreutils get_enum_none is using a loop and compare each value to None which is less efficient than a a dict call or whatever is used by standard ironpython function. |
The fix that was pushed for this appears to create an issue when the tool is still being run with IronPython 2. You will get the following error: Is the plan going forward to deprecate support for IronPython 2? |
The fix works with ironpython 2. Ironpython 2.7.10 is still default on my setup and it still works fine. |
Okay, yea I'm seeing the issue on v 2.7.7. I'm not sure what pyRevit assumes the default version to be, but perhaps we can add a check here or something. |
From what I remember ironpython 2.7.7 was maintained because it was shipped with Dynamo to ensure compatibility with Dynamo script. Dynamo have been shipping ironpython 2.7.9 from version 2.4.0 and ironpython2 evaluator is not shipped anymore from 2.13. If it is really an ironpython version issue I would vote to deprecate ironpython < 2.7.10. 2.7.7 was released in 2016… 8 years old. It’s time to update. References:
Edit: also there was so many fixes between 2.7.7 and 2.7.10… When an user have an issue, checking ironpython version is first step to solve many issues. |
@CyrilWaechter what action do you suggest on the pyRevit repo side, if any? |
Remove older ironpython engines (At least < 2.7.9). I wonder if there is still a reason to ship multiple ironpython2 engines ? If not maybe it would worth even to ship only 2.7.12 which is the last version available. On user side there might be a need to push ironpython engine update. Maybe:
|
@jmcouffin, Maybe good idea support only latest version IronPython2, IronPython3 and PythonNet |
Added this item to the next release roadmap. @dosymep |
Now, the 2711 engine is the only one available for ipy2. |
Describe the bug
Apparently ironpython 3.4 has an issue with some Enum. It might be related to
None
member.It affects apparently all script which using a
WPFWindow
.It triggers an error here:
https://github.com/eirannejad/pyRevit/blob/6aa2c493231f4301125f2570dc5efd644691bbad/pyrevitlib/rpw/ui/forms/taskdialog.py#L140
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
I found no related issue in ironpython repository.
The text was updated successfully, but these errors were encountered: