Closed eirannejad closed 1 year ago
@htlcnn
It might be related to an open issue of pythonnet https://github.com/pythonnet/pythonnet/issues/520
I ran the script and had this failure even when I'm not using CategoriesFilter. It happened after a few runs.
OR this:
pyrevit env
:
C:\Users\HTL>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.7-beta2" | Path: "C:\Users\HTL\AppData\Roaming\pyRevit-Master"
==> Attachments
master | Product: "2018 First Customer Ship" | Engine: 273 | Path: "C:\Users\HTL\AppData\Roaming\pyRevit-Master" | Manifest: "C:\Users\HTL\AppData\Roa
ming\Autodesk\Revit\Addins\2018\pyRevit.addin"
==> Installed Extensions
htl | Type: Unknown | Repo: "git@gitlab.com:hoangthanhlong/pyrevitscripts.git" | Installed: "E:\Setup\UCE\Autodesk\Revit\pyRevit extensions\htl.extens
ion"
==> Default Extension Search Path
C:\Users\HTL\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
E:\Setup\UCE\Autodesk\Revit\pyRevit extensions
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
2018 First Customer Ship | Version: 18.0.0.420 | Build: 20170223_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2018"
==> Running Revit Instances
PID: 12704 | 2018 First Customer Ship | Version: 18.0.0.420 | Build: 20170223_1515(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2018"
==> User Environment
Microsoft Windows 7 [Version 6.1.7601]
Executing User: HTL-PC\HTL
Active User: HTL-PC\HTL
Adming Access: Yes
%APPDATA%: "C:\Users\HTL\AppData\Roaming"
Latest Installed .Net Framework: 4.8
Installed .Net Target Packs: v3.5 v4.0 v4.5 v4.5.1 v4.5.2 v4.6 v4.6.1 v4.7 v4.7.1 v4.7.2 v4.X
Installed .Net-Core Target Packs: v2.2.203 v3.0.100-preview8-013656
pyRevit CLI 0.14.0.0
After this, I tried to reload pyRevit but it seemed to fail because I didn't see any output window. Other pyRevit commands (and other commands in my extension) still worked.
Closing Issue older than a year. Thanks for pointing it out. If you feel it is still relevant, feel free to reopen the issue
Describe the bug CPython engine is unstable when an object that is created in cpython scope is passed to Revit API. Seems like Revit gets stuck when trying to garbage collect the passed object(?!)
The script below, will halt Revit after a couple of executions. The script does not cause any halts when
rebars = select_objects()
is used. (Uncomment therebars = select_objects()
line and comment out therebars = select_objects_by_category('Walls')
to change the test)The issue seems to be related to passing an instance of
CategoriesFilter
to Revit API. Note that this might be related to #686