pyrevitlabs/pyRevit

[Bug]: pyRevitLoader fails to initialize addin if Autodesk Forma addin is present

bwdh2024 opened this issue · 1 comments

✈ 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

if any version of Autodesk Forma is present in the addins folder, PyRevitLoader will not finish the initialization of the addin on a new user account when they open Revit 2022 or 2024. I assume the issue also exists for other Revit versions but these are the ones i tested.

The only way to correct the issue is to remove Forma.addin from ProgramData\Autodesk\Revit\Addins\2022 or 2024 and remove the user's generated pyRevit directory in %appdata% before starting the equivalent Revit version again.

Once pyrevit loads the first time, you can put the Forma addin back in the ProgramData folder for the equivalent Revit version and pyRevit will load as long as it does not need any reinitalization.

This issue persists on the latest Forma addin (0.9.2) and the latest pyRevit version (4.8.15.24089)

This screen appears on revit on start.
pyrevitloader1
pyrevitloader2

⌨ Error/Debug Message

see screenshot in bug description

♻️ To Reproduce

No response

⏲️ Expected behavior

plugin loading properly

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

C:\Users\username>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.15.24089+0912" | Path: "C:\Program Files\pyRevit-Master"
==> Attachments
master | Product: "24.2" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "2022.1.5" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
==> Installed Extensions
==> Default Extension Search Path
C:\Users\username\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
24.2 | Version: 24.2.0.63 | Build: 20231029_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024\"
2022.1.5 | Version: 22.1.50.17 | Build: 20230915_1530(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022\"
==> Running Revit Instances
==> User Environment
Microsoft Windows 10 [Version 10.0.22621]
Executing User: (removed)
Active User: (removed)
Admin Access: No
%APPDATA%: "C:\Users\username\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.15.24089+0912.f079f5fd51756b988a06d005d4f4cd2961f36e63

Additional context

No response

This is a common pattern, not really related to the forma addin but to any addin installed with Revit that would have the same DLLs referenced bug with different version. One taking precedence over the other, making the other Dll unhappy.
Dll hell
This is great you took the time to document it properly.
This is something we are willing to fix somehow with the next big itération of pyrevit.
I will close it for now.