PyRevit not loading for some users

Hi,

I have begun getting other users to install pyrevit so we can test some custom directory extensions for 2024 (dynamo scripts). Two users had it installed but then suddenly the pyrevit tab within Revit disappeared and the error below began.

I have asked one to run ‘pyrevit env’ in cmd and can see two things. Firstly, the product naming is “24.2”, “23.1.2”, “2022.1.4”,etc. Only 2021 is named “Autodesk Revit 2021” whilst on my PC, they’re all named with the full “Autodesk Revit 202x”. Secondly, this user gets an “Error: Access is denied” under Running Revit Instances. We have tried reinstalling multiple times and different versions but no luck. Not sure how to proceed from here?

Hi,
Common pattern here,

Basically two possible solutions

  1. Clean uninstall of pyrevit, clean up of app data pyRevit and pyrevit-master folders, then reinstall

2.What also works in most cases: move all add-ins folders, uninstall then reinstall pyRevit, move all add-ins folders back

Hi Jean,

Just to confirm, by add-in folders, are you referring to the custom directories or the revit add-in file itself?

Thanks

Revit add-ons.
There are several locations, you should easily find an article about all the location on the Autodesk help site

Hi Jean,

We have tried disabling all add-ins except for PyRevit but still it won’t load for certain versions. What we have found is that PyRevit will work for Revit 2020 & 2021 (with and without other plugins enabled) but will not work for 22, 23, 24.

Following up, we went through the process of uninstalling Pyrevit, deleting all PyRevit folders in appdata & programdata and then disabling add-ins and restarting. This didnt make a difference but what we found helped for Revit 2022 & 2023 was to delete the add-in file then use CMD and ran “pyrevit attach master default 2023”. For whatever reason this resolved those two versions but does not resolve 2024. On my own PC im using IPY277 for all versions without issue so im not sure what the difference is.

Hi @ppittas since the pyrevit env command didn’t complete successfully, we’re missing an info: what is the windows version of these machines?

I saw few people having troubles with windows 11, and somebody else blaming the “latest windows 10 security updates” (but they didn’t offer proofs of that).

We’re working on the next major pyrevit release, wich will bring revit 2025 compatibility and will change the way it loads, so that we eill get rid of all these startup errors!

There’s no deadline yet, but hang tight! :wink:

Hi @sanzoghenzo ,

That user was running Windows 10 in the screenshot. I’m using Windows 11 without issue and have gotten other Windows 11 users going. At the same time, one of the other users who is experiencing the same issue is also using Windows 11. Is it recommended to use the latest Windows 11 build? All of our remaining Windows 10 laptops will slowly be migrating to Windows 11.

I don’t think the version of windows has any significant impact on pyRevit features (except for the linkify function for some)

1 Like

Thanks @ppittas, from what you tell us I deduct that the windows version doesn’t matter.

The problem is that there’s a part of pyrevit code written in C# that gets compiled at the first run (or whe you change the ironpython engine), that can’t compile because there’s a mismatch in the versions of the libraries that pyrevit expects and those already loaded by revit or the other plugins before pyrevit loads (or simply because the exact version is not available anymore in the system).

It’s a problem that’s hard to fix, and we haven’t track down the culprit (the exact combination of windows, revit, addins and .net versions)

To clarify there, I found it was most definitely security related. Linkify works fine in W11 on home PC, but at work and some other offices with Intune/Endpoint and security it was related. I think it is because the Linkify can technically open a URL, so it gets blocked.

The output windows leverages the .net webbrowser which is like an old internet explorer.
Adjusting endpoints settings does solve the problem as shown in the link :point_up:

1 Like