Skip to content
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

[Bug]: Error during update (Any help with what this means and if i need to fix something on my end) #2412

Open
5 tasks done
virtdesign17 opened this issue Oct 9, 2024 · 5 comments
Labels
Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class]

Comments

@virtdesign17
Copy link

✈ Pre-Flight checks

  • I don't have SentinelOne antivirus installed (see above for the solution)
  • I have searched in the issues (open and closed) but couldn't find a similar issue
  • I have searched in the pyRevit Forum for similar issues
  • I already followed the installation troubleshooting guide thoroughly
  • I am using the latest pyRevit Version

🐞 Describe the bug

Hi everyone I was just installing the latest update, currently running revit24. Received the code below, I would have know idea what it means, any help would be greatly appreciated.

⌨ Error/Debug Message

INFO [pyrevit.versionmgr.updater] Checking internet connection... 

INFO [pyrevit.versionmgr.updater]  Successfully updated: EF-Tools.extension to d32ee52 

INFO [pyrevit.versionmgr.updater]  Successfully updated: pyApex.extension to 450ab1d 

INFO [pyrevit.versionmgr.updater]  Successfully updated: pyArchitect.extension to 1e893d5 

INFO [pyrevit.versionmgr.updater]  Successfully updated: pyChilizer.extension to 5872a26 

INFO [pyrevit.versionmgr.updater]  Successfully updated: PyRevitPlus.extension to 121799d 

INFO [pyrevit.versionmgr.updater]  Successfully updated: pyStructure.extension to 976342f 

INFO [pyrevit.versionmgr.updater]  Successfully updated: pyTiBa.extension to 44950a9 

INFO [pyrevit.loader.sessionmgr] Reloading.... 

IronPython Traceback:
Traceback (most recent call last):
 File "C:\Users\VDMBIM\AppData\Roaming\pyRevit-Master\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Update.smartbutton\script.py", line 32, in <module>
 File "C:\Users\VDMBIM\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\versionmgr\updater.py", line 258, in update_pyrevit
 File "C:\Users\VDMBIM\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\loader\sessionmgr.py", line 327, in reload_pyrevit
 File "C:\Users\VDMBIM\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\loader\sessionmgr.py", line 285, in load_session
 File "C:\Users\VDMBIM\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\loader\sessionmgr.py", line 105, in _perform_onsessionloadstart_ops
 File "C:\Users\VDMBIM\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\loader\sessionmgr.py", line 57, in _clear_running_engines
StandardError: Exception has been thrown by the target of an invocation.


Script Executor Traceback:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Stream was not writable.
 at System.IO.StreamWriter..ctor(Stream stream, Encoding encoding, Int32 bufferSize, Boolean leaveOpen)
 at System.IO.StreamWriter..ctor(Stream stream, Encoding encoding)
 at Microsoft.Scripting.Hosting.ScriptIO.SetOutput(Stream stream, Encoding encoding)
 at PyRevitLabs.PyRevit.Runtime.IronPythonEngine.CleanupStreams()
 --- End of inner exception stack trace ---
 at Microsoft.Scripting.Runtime.LightExceptions.ThrowException(LightException lightEx)
 at Microsoft.Scripting.Runtime.LightExceptions.CheckAndThrow(Object value)
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`2.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.Run1[T0,TRet](T0 arg0)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
 at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
 at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
 at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
 at update_pyrevit$2169(Closure , PythonFunction )
 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
 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

Clicked on update
Received error

⏲️ Expected behavior

Install latest update

🖥️ Hardware and Software Setup (please complete the following information)

Microsoft Windows [Version 10.0.22631.4317]
(c) Microsoft Corporation. All rights reserved.

C:\Users\VDMBIM>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.13.23182+2215" | Path: "C:\Users\VDMBIM\AppData\Roaming\pyRevit-Master"
==> Attachments
master | Product: "Autodesk Revit 2024" | Engine: IPY277 (277) | Path: "C:\Users\VDMBIM\AppData\Roaming\pyRevit-Master" | AllUsers
==> Installed Extensions
EF-Tools | Type: UIExtension | Repo: "https:/ErikFrits/EF-Tools.git" | Installed: "S:\16_Pyrevit\EF-Tools.extension"
MyTool | Type: Unknown | Repo: "" | Installed: "S:\16_Pyrevit\MyTool.extension"
pyApex | Type: UIExtension | Repo: "https:/apex-project/pyApex.git" | Installed: "S:\16_Pyrevit\pyApex.extension"
pyArchitect | Type: UIExtension | Repo: "https:/romangolev/pyArchitect.git" | Installed: "S:\16_Pyrevit\pyArchitect.extension"
pyChilizer | Type: UIExtension | Repo: "https:/dnenov/pyChilizer" | Installed: "S:\16_Pyrevit\pyChilizer.extension"
PyRevitPlus | Type: UIExtension | Repo: "https:/gtalarico/pyrevitplus.git" | Installed: "S:\16_Pyrevit\PyRevitPlus.extension"
pySSG | Type: UIExtension | Repo: "https:/kbruxvoort/SSG.extension.git" | Installed: "S:\16_Pyrevit\pySSG.extension"
pyStructure | Type: UIExtension | Repo: "https:/sampy23/pyStruct.extension" | Installed: "S:\16_Pyrevit\pyStructure.extension"
pyTiBa | Type: UIExtension | Repo: "https:/tillbaum/pytiba.git" | Installed: "S:\16_Pyrevit\pyTiBa.extension"
VDMBIM | Type: Unknown | Repo: "" | Installed: "S:\16_Pyrevit\VDMBIM.extension"
==> Default Extension Search Path
C:\Users\VDMBIM\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
S:\16_Pyrevit
==> Extension Sources - Default
https:/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
Autodesk Revit 2024 | Version: 24.3.0.13 | Build: 20240912_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024\"
==> Running Revit Instances
Error: Object reference not set to an instance of an object.
Run with "--debug" option to see debug messages

Additional context

No response

@virtdesign17 virtdesign17 added the Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class] label Oct 9, 2024
@sanzoghenzo
Copy link
Contributor

Hi @virtdesign17,
Pyrevit has been updated, but the function that reloads the python engine incurred in an error.
I believe a Revit restart is enough, but we should check this and make it more robust.

@virtdesign17
Copy link
Author

virtdesign17 commented Oct 9, 2024 via email

@sanzoghenzo
Copy link
Contributor

Didn't pyrevit update itself? The messages tell that the extension were updated, and the error is thrown while trying to reload the python engines.
A pyrevit restart doesn’t get rid of the error, but you should have an updated pyrevit (so no need to retry the update). Is it not?

@virtdesign17
Copy link
Author

virtdesign17 commented Oct 13, 2024 via email

@sanzoghenzo
Copy link
Contributor

Please note that, as stated here, the "Update" button only updates pyRevit extensions, not pyRevit itself.
For it, you need to download and run the installer.

@pyrevitlabs pyrevitlabs deleted a comment from virtdesign17 Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class]
Projects
None yet
Development

No branches or pull requests

2 participants