pyRevit
pyRevit copied to clipboard
Load Error
Describe the bug PyRevit installation causes Revit to crash on startup. PyRevit tab does not show on the ribbon in the loading screen. There is no ability to interrupt Revit's load sequence.
To Reproduce
- Start a clean install of PyRevit
- Open Revit
- Select " Always load" when prompted to load PyRevit upon startup
- Revit crashes
Expected behavior I expected revit to startup and load PyRevit properly.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 10
- pyRevit 4.8.9.22004+1713-wip
- pyRevit Environment:
C:\Users\JamesMckinnon>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.9.22004+1713-wip" | Path: "C:\Users\JamesMckinnon\AppData\Roaming\pyRevit-Master"
==> Attachments
master | Product: "2022.1" | Engine: IPY277 (277) | Path: "C:\Users\JamesMckinnon\AppData\Roaming\pyRevit-Master"
master | Product: "Autodesk Revit 2021" | Engine: IPY277 (277) | Path: "C:\Users\JamesMckinnon\AppData\Roaming\pyRevit-Master"
==> Installed Extensions
==> Default Extension Search Path
C:\Users\JamesMckinnon\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
2022.1 | Version: 22.1.1.516 | Build: 20210921_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022\"
Autodesk Revit 2021 | Version: 21.1.21.45 | Build: 20201116_1100(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021\"
==> Running Revit Instances
==> User Environment
Microsoft Windows 10 [Version 10.0.19043]
Executing User: AzureAD\JamesMckinnon
Active User: AzureAD\JamesMckinnon
Admin Access: No
%APPDATA%: "C:\Users\JamesMckinnon\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.9.22004+1713-wip
Additional context This error has also occured with version 4.8.9, non WIP version.
Which Revit version?
The error occurs for both Revit 2021 and Revit 2022.
Uninstalling PyRevit without disabling the add-in does not resolve the error. The only quick resolution I have found is disabling PyRevit using the Stantec Revit add-in manager.
Would you mind sending me ALL the *.log files in %APPDATA%/pyRevit/2021
and %APPDATA%/pyRevit/2022
The following files below are the two logs present within the folders:
pyRevit_2021_36adc1423c73aaae_PyRevitLabs.PyRevit.Runtime.log
pyRevit_2022_36adc1423c73aaae_PyRevitLabs.PyRevit.Runtime.log
@HamezMM I pushed a fix and the WIP installers are here: https://github.com/eirannejad/pyRevit/actions/runs/1669963623 Would you mind installing and see if it loads with Revit?
The problem seems to be related to System.Web
dll that was being loaded for the x86 architecture. I had the same warning on my machine but it was not throwing any issues.
@eirannejad I uninstalled PyRevit and did a clean install on my machine after restarting. The same bug is persisting with the 4.8.9.22008+0042 WIP build when loading Revit 2022.1. Upon loading Revit 2021.1.2 there was no crash but PyRevit did not appear on the ribbon and was not accessible through the keyboard shortcut dialogue window.
Futhermore, I could not find the same log files in the PyRevit folder as before.
Okay so pyRevit is not properly attached. Let's open a command prompt, type pyrevit env
, and share the results please
Here are the results from checking the PyRevit env
:\Users\JamesMckinnon>pyrevit env ==> Registered Clones (full git repos) ==> Registered Clones (deployed from archive/image) master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.9.22008+0042-wip" | Path: "C:\Users\JamesMckinnon\AppData\Roaming\pyRevit-Master" ==> Attachments ==> Installed Extensions ==> Default Extension Search Path C:\Users\JamesMckinnon\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 2022.1 | Version: 22.1.1.516 | Build: 20210921_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022" Autodesk Revit 2021 | Version: 21.1.21.45 | Build: 20201116_1100(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021" ==> Running Revit Instances Error: Object reference not set to an instance of an object. Run with "--debug" option to see debug messages
C:\Users\JamesMckinnon>
Okay now run pyrevit attach master 277 --installed
This should attach pyRevit to Revit 2021 and 2022
Running into the same issue after reinstalling pyRevit (4.8.9.22008+0042-wip and running the above command. Here are my results from "pyRevit env":
==> Registered Clones (full git repos) ==> Registered Clones (deployed from archive/image) master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.9.22008+0042-wip" | Path: "C:\Users\rspeicher\AppData\Roaming\pyRevit-Master" ==> Attachments master | Product: "2022.1.1" | Engine: IPY277 (277) | Path: "C:\Users\rspeicher\AppData\Roaming\pyRevit-Master" master | Product: "2021.1.5" | Engine: IPY277 (277) | Path: "C:\Users\rspeicher\AppData\Roaming\pyRevit-Master" master | Product: "2020.2.6" | Engine: IPY277 (277) | Path: "C:\Users\rspeicher\AppData\Roaming\pyRevit-Master" master | Product: "2019.2.4" | Engine: IPY277 (277) | Path: "C:\Users\rspeicher\AppData\Roaming\pyRevit-Master" ==> Installed Extensions ==> Default Extension Search Path C:\Users\rspeicher\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 2022.1.1 | Version: 22.1.10.541 | Build: 20211103_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022" 2021.1.5 | Version: 21.1.50.27 | Build: 20211018_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021" 2020.2.6 | Version: 20.2.60.15 | Build: 20211019_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020" 2019.2.4 | Version: 19.2.40.15 | Build: 20211029_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2019" ==> Running Revit Instances ==> User Environment Microsoft Windows 10 [Version 10.0.19042] Executing User: WMF\rspeicher Active User: WMF\rspeicher Admin Access: No %APPDATA%: "C:\Users\rspeicher\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.9.22008+0042-wip
Please note that this instance is running on a virtual platform hosted on VMware, if that makes a difference.
Sorry for the late response, running the "pyrevit attach master 277 --installed" command has not resolved the error.
The following is my current version and environment setup in the command prompt:
C:\Users\JamesMckinnon>pyrevit -V pyrevit v4.8.10.22040+1743 Missing authorization token. Set on GITHUBTOKEN env var
C:\Users\JamesMckinnon>pyrevit env ==> Registered Clones (full git repos) ==> Registered Clones (deployed from archive/image) master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.9.22008+0042-wip" | Path: "C:\Users\JamesMckinnon\AppData\Roaming\pyRevit-Master" ==> Attachments master | Product: "2022.1" | Engine: IPY277 (277) | Path: "C:\Users\JamesMckinnon\AppData\Roaming\pyRevit-Master" master | Product: "Autodesk Revit 2021" | Engine: IPY277 (277) | Path: "C:\Users\JamesMckinnon\AppData\Roaming\pyRevit-Master" ==> Installed Extensions ==> Default Extension Search Path C:\Users\JamesMckinnon\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 2022.1 | Version: 22.1.1.516 | Build: 20210921_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022" Autodesk Revit 2021 | Version: 21.1.21.45 | Build: 20201116_1100(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021" ==> Running Revit Instances ==> User Environment Microsoft Windows 10 [Version 10.0.19043] Executing User: AzureAD\JamesMckinnon Active User: AzureAD\JamesMckinnon Admin Access: No %APPDATA%: "C:\Users\JamesMckinnon\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
I started digging through the Revit log files and found where the API failed to load. Upon googling the error I found that in issue #1055 ChrisCrosley had the exact same log result as I had. Our IT provider uses SentinelOne for their endpoints. I have reached out to our IT to request that Revit and PyRevit get whitelisted on SentinelOne. I will update once this gets dealt with.
@HamezMM - Excellent sleuthing on your part! White listing pyRevit and the Revit(s) solved the issue. Thanks!
Hi All, installing the latest files that Ehsan refered to helped me fix the issue with Revit 2020. Thanks @eirannejad
@HamezMM - Excellent sleuthing on your part! White listing pyRevit and the Revit(s) solved the issue. Thanks!
Hi I have the same problem here, can you show us which folders you whitelisted please?