You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Used the Find And Select Entities Without Tags for walls in a plan view, got the error as below
⌨ Error/Debug Message
IronPython Traceback:
Traceback (most recent call last):
File "C:\PyRevit-Master\PyRevit\extensions\pyRevitTools.extension\pyRevit.tab\Selection.panel\select.stack\Select.pulldown\Find And Select Entities Without Tags.pushbutton\script.py", line 243, in<module>
ValueError: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Script Executor Traceback:
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1.get_Item(Int32 index) at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at PyRevitLabs.PyRevit.Runtime.IronPythonEngine.Execute(ScriptRuntime& runtime)
♻️ To Reproduce
No response
⏲️ Expected behavior
No response
🖥️ Hardware and Software Setup (please complete the following information)
Hi @JerryWu25,
I'm sorry you're having troubles with that command.
I cannot test it right now, but in the meantime you could try to detect which element gives you troubles by adding the following before the line 243 of the script (ALT+click on the button to open the script folder)
print("Element", eltid, "Tagged local element Ids", elt.GetTaggedLocalElementIds())
In the output windows you should see a list of Element ......, the last one (but it might as well be the first) before the error is the one that gives you trouble.
If the end of the line is gibberish, try to use list(elt.GetTaggedLocalElementIds()) instead to make it a python list that should be printed more nicely.
Once you have the incriminating element Id, it will be easier to troubleshoot and reproduce the issue
Hi @sanzoghenzo , thanks for the hint, for some reason that "troublemaker" somehow disappeared this morning, we might accidentally fixed it, I will definitely try your tips if I see it again and I will reopen another case.
✈ Pre-Flight checks
🐞 Describe the bug
Used the Find And Select Entities Without Tags for walls in a plan view, got the error as below
⌨ Error/Debug Message
♻️ To Reproduce
No response
⏲️ Expected behavior
No response
🖥️ Hardware and Software Setup (please complete the following information)
Additional context
No response
The text was updated successfully, but these errors were encountered: