pyRevit icon indicating copy to clipboard operation
pyRevit copied to clipboard

CopyVP Error

Open milk-c opened this issue 3 years ago • 1 comments

Describe the bug

when i clicked on copyVP and on the viewport to be copied, error appears.

IronPython Traceback: Traceback (most recent call last): File "C:\Users\AppData\Roaming\pyRevit\Extensions\PyRevitPlus.extension\pyRevitPlus.tab\ViewPorts.panel\ViewportPlacement.stack\CopyVP.pushbutton\script.py", line 57, in File "pickle.py", line 1376, in dump File "pickle.py", line 286, in save File "pickle.py", line 752, in save_global File "pickle.py", line 224, in dump File "pickle.py", line 331, in save File "pickle.py", line 401, in save_reduce File "pickle.py", line 286, in save File "pickle.py", line 568, in save_tuple pickle.PicklingError: Can't pickle <class 'namedtuple_Point.Point'>: it's not found as namedtuple_Point.Point

Script Executor Traceback: System.Exception: Can't pickle <class 'namedtuple_Point.Point'>: it's not found as namedtuple_Point.Point 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)

To Reproduce Steps to reproduce the behavior:

  1. Go to copyVP
  2. Click on copyVP and then on viewport
  3. See error

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • pyRevit Version 4.8.8:277:2019.2
  • pyRevit Environment: Open a command prompt and run the command below. Replace these lines with the results. Take a look at this markdown guide and wrap the command results in ``` when pasting here for correct formatting.

pyrevit env

Additional context Add any other context about the problem here.

milk-c avatar Nov 05 '21 04:11 milk-c

/blame /me. Is pickle() provided by IronPython, or pyRevit? It's about the support of older Revit and pyRevit revisions. Currently script.store_data() / script.load_data() seems to work fine on Revit2021 / pyRevit 4.8.10.22040+1743

ejs-ejs avatar Jul 12 '22 11:07 ejs-ejs