Tema: Re: Q: IronPython + pyrevit scopes
Autorius: Grzegorz Brzęczyszczykiewicz
Data: 2022-06-30 21:10:38
2022-06-30 23:43, Laimis rašė:
> O kaip „susiklijuoja“ (kas ką ir kaip importuoja) script.py ir
> tags_wrapper.py?
script.py - pyrevit per GUI, tags_wrapper.py - scripts.py
Kešavimo nėra, failų pakeitimai matomi iškart išsaugojus.
IronPython Traceback:
Traceback (most recent call last):
File "C:\Users\.\AppData\Roaming\pyRevit\Extensions\PyRevitPlus.extension\pyRevitPlus.tab\Tags.panel\Tags.stack\Align Vertically.pushbutton\script.py", line 68, in <module>
File "C:\Users\.\AppData\Roaming\pyRevit\Extensions\PyRevitPlus.extension\pyRevitPlus.tab\Tags.panel\Tags.stack\lib\tags_wrapper.py", line 234, in tag_align_XY
NameError: global name 'app' is not defined
Script Executor Traceback:
IronPython.Runtime.UnboundNameException: global name 'app' is not defined
at Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.HandleException(InterpretedFrame frame, Exception exception)
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)
--
Grzegorz
Chrząszczyrzewoszyce, powiat Łękołody