pyRevit icon indicating copy to clipboard operation
pyRevit copied to clipboard

pyRevit Installed, Does Not Load

Open DavidWKoch opened this issue 2 years ago • 2 comments

Describe the bug When starting Revit, instead of the usual INFO window, I was getting a PyRevitLoader - Error Loading pyRevit dialog with the following text:

IronPython Traceback: Traceback (most recent call last): File “C:\Users\dkoch\AppData\Roaming\pyRevit-Master\bin\engines\pyRevitloader.py”, line 33, in File “C:\Users\dkoch\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\loader\sessionmgr.py”, line 276, in load_session File “C:\Users\dkoch\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\loader\sessionmgr.py”, line 66, in _setup_output SystemError: Attempted to access an element as a type incompatible with the array.

Script Executor Traceback: System.ArrayTypeMismatchException: Attempted to access an element as a type incompatible with the array. at Microsoft.Scripting.Interpreter.NewInstruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0.T1.T2,TRet](T0 arg0, T1 arg1, T2 arg2) at System.Dynamic.UpdateDelegates.UpdateAndExecule2[T0.T1.T2,TRet](CallSite site, T0 arg0, T1 arg1) at Iron Python.Compiler.Ast.CallExpression.Invoke0lnstruction.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.FuncCallInstruction'5.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2) at IronPython.Compiler.Ast.CallExpression.Invoke0lnstruction.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(lnterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at Iron Python.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at PyRevitLoader.ScriptExecutor.ExecuteScript(String sourcePath, IEnumerable'1 sysPaths, String logFilePath, IDictionary'2 variables)

I uninstalled pyRevit and then reinstalled it (pyRevit_4.8.10.22040_signed.exe for reinstall). After the reinstall, pyRevit did not load at all. I followed the instructions here . Initially, there were no attachments, but after verifying that master was listed as a clone, I ran the pyrevit attach master 277 --installed command, and attachments for Revit 2018--2023 were reported. I still get the same PyRevitLoader error.

To Reproduce Steps to reproduce the behavior:

  1. Start Revit
  2. See PyRevitLoader Error Loading pyRevit dialog

Expected behavior I expected pyRevit to load, displaying the INFO screen for a bit, and then to have the pyRevit ribbon tab available in Revit.

Screenshots Screenshots of the PyRevitLoader Error Loading pyRevit dialog and of the command window when checking for attachments and then creating the attachments have been added. PyRevitLoader-ErrorLoadingPyRevit pyrevit attached

Desktop (please complete the following information):

  • OS: Windows 11 Enterprise, Version 21H2, OS Build 22000.613
  • pyRevit Version 4.8.10.22040
  • pyRevit Environment:
C:\Users\dkoch>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.10.22040+1743" | Path: "C:\Users\dkoch\AppData\Roaming\pyRevit-Master"
==> Attachments
master | Product: "Autodesk Revit 2023" | Engine: IPY277 (277) | Path: "C:\Users\dkoch\AppData\Roaming\pyRevit-Master"
master | Product: "2022.1.1" | Engine: IPY277 (277) | Path: "C:\Users\dkoch\AppData\Roaming\pyRevit-Master"
master | Product: "2021.1.2" | Engine: IPY277 (277) | Path: "C:\Users\dkoch\AppData\Roaming\pyRevit-Master"
master | Product: "2020.2.5" | Engine: IPY277 (277) | Path: "C:\Users\dkoch\AppData\Roaming\pyRevit-Master"
master | Product: "2019.2.2 Hotfix" | Engine: IPY277 (277) | Path: "C:\Users\dkoch\AppData\Roaming\pyRevit-Master"
master | Product: "2018.3.3 Security Fix" | Engine: IPY277 (277) | Path: "C:\Users\dkoch\AppData\Roaming\pyRevit-Master"
==> Installed Extensions
==> Default Extension Search Path
C:\Users\dkoch\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
Autodesk Revit 2023 | Version: 23.0.11.19 | Build: 20220503_1030(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023\"
2022.1.1 | Version: 22.1.10.541 | Build: 20211103_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022\"
2021.1.2 | Version: 21.1.20.44 | Build: 20201109_1530(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021\"
2020.2.5 | Version: 20.2.50.77 | Build: 20210804_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020\"
2019.2.2 Hotfix | Version: 19.2.20.24 | Build: 20190808_0900(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2019\"
2018.3.3 Security Fix | Version: 18.3.3.18 | Build: 20190510_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2018\"
==> Running Revit Instances
PID: 23780 | 2022.1.1 | Version: 22.1.10.541 | Build: 20211103_1515(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2022"
==> User Environment
Microsoft Windows 10 [Version 10.0.22000]
Executing User: ECPHFD\dkoch
Active User: ECPHFD\dkoch
Admin Access: No
%APPDATA%: "C:\Users\dkoch\AppData\Roaming"
Latest Installed .Net Framework: 4.8
No .Net Target Packs are installed.
No .Ne-Core Target Packs are installed.
pyRevit CLI v4.8.10.22040+1743

Additional context Add any other context about the problem here.

Just noticed that in the output of the pyrevit env command, it thinks the OS is Windows 10 [Version 10.0.22000]. Windows 11 was installed as an upgrade to Windows 10 on this machine. It was not installed from scratch.

DavidWKoch avatar Jul 15 '22 18:07 DavidWKoch

Based on Pyrevit not loading with Microdesk BIMrx add-on #1580, I tried disabling the Microdesk BIMrx add-in and doing so allowed pyRevit to load without error.

I will pass this along to Microdesk. Perhaps they can fix whatever they did in their latest update that steps on pyRevit's toes.

DavidWKoch avatar Aug 11 '22 13:08 DavidWKoch

Microdesk reports that the issue is that their add-in is loading newer versions of certain Microsoft Framework dlls than those used by pyRevit. If BIMrx loads first, the newer versions load and pyRevit fails. If pyRevit loads first, both will load. Microdesk is still testing to see if the older dlls cause any errors with BIMrx commands.

The workaround, for now, is to rename the pyRevit.addin file so that the name is alphabetically before Microdesk.BIMrx.addin, so that it loads first. Changing it to ApyRevit.addin worked for me.

DavidWKoch avatar Aug 11 '22 14:08 DavidWKoch

I have tried installing the latest release [pyRevit_4.8.12.22247_signed.exe], but I still get the same issue with the loading failing when I have Microdesk's BIMrx installed. Renaming the pyRevit.addin file to ApyRevit.addin resolved the issue. Also experiencing an odd effect: after installing pyRevit_4.8.12.22247_signed.exe, if I then install the command line interface [pyRevit_CLI_4.8.12.22247_admin_signed.exe], the pyRevit.addin files are removed (even when renamed to ApyRevit.addin). Has anyone else had that problem as well? I can work without the CLI and with the renaming of the addins.

DavidWKoch avatar Sep 07 '22 13:09 DavidWKoch

Have same issue image

Revit version is 2020. Previously version V4.8.8 was working fine

Avinashhv avatar Sep 08 '22 05:09 Avinashhv