pyrevitlabs / pyRevit

Rapid Application Development (RAD) Environment for Autodesk Revit®
http://wiki.pyrevitlabs.io
GNU General Public License v3.0
1.32k stars 337 forks source link

[Bug]: IronPython Traceback error message when opening Revit 2022, 2023 & 2024 #2330

Closed BIMGSE closed 3 months ago

BIMGSE commented 3 months ago

✈ Pre-Flight checks

🐞 Describe the bug

The classic Pyrevit BSOD appears on my new computer after installing PyRevit... What a nighmare because I know that we have to spend hours trying to fix it. So with the IT Team and myself we spent time trying to fix it. We only use PyRevit for colouring tabs. Is there a way to colour tabs with a different plugin or a PyRevit Light for example ?

We have SentinelOne in our company (600 employees) however exceptions have been made last year and Pyrevit works on my colleague's computers. Some of them are having errors, it's getting more and more frequent on the new installations. We don't know or understand why.

We have tried this with versions 4.8.13, 4.8.14, 4.8.15, 4.8.16... We have tried with "signed" and "admin signed" (what is the difference?)

We have tried installing it in default %appdata% and in another folder (here in user/documents and the same problem persists)

image

We have ran in cmd lines "pyrevit attached" and this is the message : image

So it seems that pyrevit is indeed installed (here on the default installation folder.)

We have tried to uninstall and to remove each plugin 1 by 1 and this didn't solve the issue.

I have the following plugins :

Any help would be greatly appreaciated. I think cumulated there's more than 20 hours of manwork in our company to trying to fix this, with several IT people and we still can't get PyRevit running unfortunately. Again this is just to colour tabs in Revit ! Since this feature is so useful. We have seen on linkedin that many people are having this problem.

Maybe I could try to uninstall all plugins completely, I have tried that. We're installing as local admin on my user session. Should we do something differently ? Should we install on admin session ? We are honestly losing hope, and any help or support would be greatly appreciated.

⌨ Error/Debug Message

see above

♻️ To Reproduce

No response

⏲️ Expected behavior

No response

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

==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.15.24089+0912" | Path: "C:\Users\jsanders\Documents\pyRevit-Master"
==> Attachments
master | Product: "24.2" | Engine: DEFAULT (2711) | Path: "C:\Users\jsanders\Documents\pyRevit-Master"
master | Product: "2023.1.1" | Engine: DEFAULT (2711) | Path: "C:\Users\jsanders\Documents\pyRevit-Master"
master | Product: "2022.1.3" | Engine: DEFAULT (2711) | Path: "C:\Users\jsanders\Documents\pyRevit-Master"
==> Installed Extensions
==> Default Extension Search Path
C:\Users\jsanders\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\"
2023.1.1 | Version: 23.1.10.4 | Build: 20221122_1550(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023\"
2022.1.3 | Version: 22.1.30.34 | Build: 20220520_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022\"
==> Running Revit Instances
PID: 33116 | 24.2 | Version: 24.2.0.63 | Build: 20231029_1515(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2024"
==> User Environment
Microsoft Windows 10 [Version 10.0.19045]
Executing User: GSEGROUP\jSanders
Active User: GSEGROUP\jSanders
Admin Access: No
%APPDATA%: "C:\Users\jsanders\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

Any help will be immensely appreciated, we really want to crack this puzzle.

mangrove-art commented 3 months ago

@BIMGSE You might have a look to parallax team website, implemented colored tabs in pyRevit. Neat UI for Revit seems to be what your looking for https://parallaxteam.onfastspring.com/

jmcouffin commented 3 months ago

/install-fix

github-actions[bot] commented 3 months ago

Hi @BIMGSE, Try these steps:

  1. Uninstall pyRevit

  2. Delete C:\ProgramData and %AppData%\ pyRevit and pyrevit-master folders

  3. Move all Revit addins to a temporary location. Usual addins locations include:

    • %AppData%\Autodesk\Revit\Addins
    • %AppData%\Autodesk\ApplicationPlugins
    • %ProgramData%\Autodesk\Revit\Addins
    • %ProgramData%\Autodesk\ApplicationPlugins
  4. [Reboot computer]

  5. Reinstall pyRevit

  6. Started each version of Revit confirming pyRevit successfully compiled at startup.

  7. Move all Revit addins that were moved in step 3 back to their original location. You may want to add them one at a time and start a revit session everytime to figure out which ones are causing the issue.

jmcouffin commented 3 months ago

@BIMGSE from the screenshot, I can tell you this is due to Loading sequence of plugins and dll hell. Try the step in the post above, they do work in this case.

BIMGSE commented 3 months ago

/install-fix

Hi, where do I type this ? in cmd ?

BIMGSE commented 3 months ago

@BIMGSE from the screenshot, I can tell you this is due to Loading sequence of plugins and dll hell. Try the step in the post above, they do work in this case.

So I found the solution, it was indeed loading sequence. This is absolute pure hell to deal with.

The problem is Forma Autodesk Plugin. Uninstalling this then reinstalling PyRevit was the solution. This is the step by step process :

It took us all morning with 2 people to figure this out. Jesus Christ, we actually made it, the madlads.

Would it be possible for the devs to rename the pyrevit dll to "0_pyrevit.dll" for example ? So that it starts first ? This would help and save lots of people in the world.

jmcouffin commented 3 months ago

/install-fix

Hi, where do I type this ? in cmd ?

this is just a shorthand to get the fix steps for installation issues reported in github.

jmcouffin commented 3 months ago

Would it be possible for the devs to rename the pyrevit dll to "0_pyrevit.dll" for example ? So that it starts first ? This would help and save lots of people in the world.

I know this is hell. The thing is with renaming the dll is that it is not a long term solution. Imagine all addins devs doing so, that would be a new kind of hell.

BIMGSE commented 3 months ago

/install-fix

Hi, where do I type this ? in cmd ?

this is just a shorthand to get the fix steps for installation issues reported in github.

oh yeah that makes sense.

BIMGSE commented 3 months ago

Would it be possible for the devs to rename the pyrevit dll to "0_pyrevit.dll" for example ? So that it starts first ? This would help and save lots of people in the world.

I know this is hell. The thing is with renaming the dll is that it is not a long term solution. Imagine all addins devs doing so, that would be a new kind of hell.

yeah I understand... However if Pyrevit was named "ByRevit" or "APyRevit" this problem wouldn't occure if I'm not mistaken. Ah well, at least we know how to solve it.

The thing is that no other dev renames their dll, so I think you could rename your dll to "awesome pyrevit.dll" or "autodesk pyrevit" or "authoer pyrevit" or something of that sorts... ?

jmcouffin commented 3 months ago

We are trying to fix this differently, packing the dll dependencies another way.

BIMGSE commented 3 months ago

We are trying to fix this differently, packing the dll dependencies another way.

Good luck !

Using Revit without colour tabs from PyRevit is absolutely essential now for all of us.

BIMGSE commented 3 months ago

@BIMGSE You might have a look to parallax team website, implemented colored tabs in pyRevit. Neat UI for Revit seems to be what your looking for https://parallaxteam.onfastspring.com/

60eur per year to add colours to Revit Tabs... 😥 a bit too expensive

jmcouffin commented 3 months ago

60eur per year to add colours to Revit Tabs... 😥 a bit too expensive

If you need it... Get it. The site licence is at 1000eur (500seats) a bargain IMHO

mangrove-art commented 3 months ago

@BIMGSE I agree with @jmcouffin. You asked for a solution, people try to help you kindly.

BIMGSE commented 3 months ago

@BIMGSE I agree with @jmcouffin. You asked for a solution, people try to help you kindly.

I understand, it's just that I only need the function of colouring tabs, the plugin offers more than that.

We are bout 25 people to use Revit in our company (600 employees). If we were many more then yes the licence is extremely cheap, almost free.

However I have found a free plugin that does the colouring tabs trick : https://youtu.be/gBocNI0eVT8

For now I'll keep using PyRevit, but if PyRevit breaks again due to addin order shenanigans then I'll try Ta.D Tools.