pyRevit loading error after engine change

Hi all,

I changed my active engine in the pyRevit settings, on my next opening of Revit, pyRevit fails to launce and I get this error.

Is there anything I can do to fix this, short of a reinstall?

Thanks.

Could be your pyrevit version, but to be sure of that we should get some more information on your environment.

Mind doing the following?

  1. open command prompt or powershell
  2. type: pyrevit env press enter
  3. share the output in this thread

It could help us figure out where things are going awry

Thanks. This is the output:

C:\Users\cdennis>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: “basepublic” | Branch: “master” | Version: “4.8.12.22247+0031” | Path: “C:\Users\cdennis\AppData\Roaming\pyRevit-Master”
==> Attachments
master | Product: “Autodesk Revit 2023” | Engine: IPY273 (273) | Path: “C:\Users\cdennis\AppData\Roaming\pyRevit-Master”
master | Product: “Autodesk Revit 2022” | Engine: IPY273 (273) | Path: “C:\Users\cdennis\AppData\Roaming\pyRevit-Master”
==> Installed Extensions
Darwin | Type: Unknown | Repo: “” | Installed: “C:\Users\cdennis\OneDrive - Darwin Group\Documents\PyRevit - Darwin Group\extensions\Darwin.extension”
==> Default Extension Search Path
C:\Users\cdennis\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
C:\Users\cdennis\OneDrive - Darwin Group\Documents\PyRevit - Darwin Group\extensions
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
Autodesk Revit 2023 | Version: 23.1.30.97 | Build: 20230828_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023"
Autodesk Revit 2022 | Version: 22.1.50.17 | Build: 20230915_1530(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022"
==> Running Revit Instances
Error: Object reference not set to an instance of an object.
Run with “–debug” option to see debug messages

Not seeing anything strange on the pyrevit version front, it’s just one version behind.
One thing that strikes me as odd is your ironpython version, being 2.7.3
I didn’t even know pyrevit came with ironpython 2.7.3.

Can you try doing the following in your command prompt?

pyrevit attach master 279 --installed

This will change your ironpython to 279. (That’s the one I tend to default to)
Restart revit and see if that does anything.

If that doens’t work then I do recommend updating your pyrevit to the latest version 4.8.13.
And that’s also where my knowledge on the subject ends :confused:

1 Like

I got the same error with 279, but with trying 277 it is now loading for me.

I will also update to the latest version of pyRevit.

Thank you for your help!

Glad I could help :slight_smile:

It is a bit odd that 279 didn’t work… thought maybe they weren’t installed previously?
Here’s hoping that the new install also installs some other python versions for you.

If your pyrevit actually manags to load, you can also switch python engines in the pyrevit settings menu. So you don’t have to do it through the command line.
Added bonus is that you can see which python engines are installed :smiley:

1 Like

FYI

pyRevit won’t load - How to fix pyRevit installation

I added a few information to debug installation and loading of pyRevit here

2 Likes