Pyrevit wont load after installing

Hi,

Tried my best searching through Github and the forum, but whitout any luck…
I have trouble loading Pyrevit on Revit 2023…
I have reinstalled it several times… Do any have a clue what is causing this ?

I see some of the Errors are aboute the length of the chars of the path. I have tried to install it the recomended path, and rigth afte c:. But nothing has changed…


I have something similar…any ideas why pyRevit is not loading?

Hi @mafooon , welcome to the forum!

I assume this happens with the new pyrevit version, doesn’t it?
Does the previous version have the same problem?

Did you add your extension(s) to the pyrevit extensions paths? If so, could it be that the folder you placed it is very long?
In my company we had problems with long paths while using paths in google drive that were inside a shared folder linked to the root of my drive (links are shown as the shared folder name, but the path uses its id that is quite long); it may be that other cloud storage apps behave similarly.

If this is jot thr case, I’m afraid you discovered a bug! Can you please post the output of the pyrevit env command (run it in a command prompt or powershell window)?
Alternatively, you can open a new issue on github with all the info requested

Hi @EENagel74 , welcome to you too!

The window is similar, but the error is not.
I ask you to provide the revit env output, so that we can check if everything is set up correctly.
Did this error come up at the first run, or after some time/config changes?

Hello! This is the loading error that happens when I launch Revit 2023. I close this message box and Revit continues to open just fine without pyRevit. What is the “revit env” output that you are asking for?

Loading sequence between more recent dlls referenced by other addin.
Adding a A or a 0 before the pyrevit.Addin file usually did the trick.
Hard to tell which addin without the full list and deactivating them one at a time and restarting revit.
see:

If you can pin it on another addin, it will be possible to look at which dlls are being loaded are more recent

We do have BIMrx as an addin, so that was the issue…a conflict of Microsoft Framework dlls. I followed the solution to rename the pyRevit.addin file to ApyRevit.addin. This allows pyRevit to load first and therefore avoids the conflict when BIMrx loads. Thanks for the help and pointing me in a direction, right or otherwise.

1 Like

This is a command line that will output versions of Revit being used, os version, extension list and pyrevit’ version

Hi again,

Sorry for late reply, bussy week…
But i tried to adding A or 0 in the Pyrevit.Addin file but still the same error message.
I also have Revit 2024, and there i have nothing installed except pyrevit…
And there i also get the same error.

these two extension search paths aren’t necessary


But they should not change anything to your issue.

  1. Try running pyRevit without your extension, so that we can exonerate it from causing the trouble please.
  2. check this regarding the path that is too long How to resolve 'path is too long' error - endless abending loop! - Microsoft Community Hub referenced in Revit 2021 Load failed · Issue #1683 · eirannejad/pyRevit · GitHub

Thanks for reply Jean!

I went to my extension folder. removed my .extension from the folder so pyrevit wont load it.
It is located on sharepoint, and one folder i think were corrupt. I could not delete it…
This sometimes happen with files and folder located on sharepoint… Maybe this were the problem? I could not open it manualy either.

I created a new extension, reloaded pyrevit and my new extension were loaded. Tried to restart Revit aswell, and no error message :wink:

Thanks all for the help.


Best regards
Marton.

no pb. Glad it helped.
Sometimes softwares that do the link between Drive, Sharepoint, GDrive create some ‘invisible’ shortcuts that lead to longer filepath.

So I was almost right!
I never rely on shared drives for programs or code; its best to use a versioning tool such as git.

Obvusly is harder for your colleagues to understand and setup things, but once done, and if you use tortoisegit, updating the extension it’s just a right click → tortoise git → pull away…

1 Like

Jiminy Cricket told me recently :

ControlzEx.dll BIMrX is using v5.0.1.15 and pyrevit bin includes 3.0.2.4.