Using both Pyrevit 4.8.16 and 5.0

I have downloaded and installed both versions 4.8.16 and the WIP 5.0. I installed them to two different folders.

I tried to install just the 5.0 hoping it would work with all versions, but I get an error in the pre-2025 versions and it won’t load. So I then try to load up both, but I can’t seem to get them both to work at the same time. Which ever one I reinstall last is the one that seems to work.

Please let me know if this just isn’t meant to work, if I should only have the 5.0 WIP version on the system, or what? If you need more info, let me know. I can get screenshots for you.

can you confirm that the error you get on 2023-2024 is similar to the issue logged here?

The Expectation is to be able to use Pyrevit 5 across all versions, please download the installer from the action below and install, it should fix it for now:
pyRevitCI · pyrevitlabs/pyRevit@a0c7874 (github.com)

I fixed the link :point_up_2: as it was a duplicate issue.
The fix is being treated. Expect a new WIP today or monday.
Sit tight.

@tayOthman, I did not take screenshots (which I should have, sorry) but those errors do look familiar, so I think that was one of the issues. That link that you provided however, downloads version 5.0.0.24236. I already had 5.0.0.24242, which would be newer correct? @Jean-Marc says he is going to put out a new WIP today or tomorrow, so I’ll wait for that one. Thank you.

@Jean-Marc, thank you. I look forward to getting the updated file. Once I get that, I presume I should completely wipe off all older versions of pyRevit from the system, and then install the new. Could you post a link here in this topic once you have it please? Thank you!

@Jean-Marc and @tayOthman, I downloaded the new WIP file this morning and got version 5.0.0.24246. I uninstalled all versions of pyRevit from my system. Installed the admin_signed version of 5.0.0.24246. It works in 2025, but not earlier versions. I took a screenshot of the error and pasted it here. I hope this works. Thanks for the new WIP, but it looks like I’m back to 4.8.16.24121 for the moment. I’ll keep my eyes out for updates. Thanks for all of your hard work!

the fix haven’t been merged yet.

Fix runtime by sanzoghenzo · Pull Request #2384 · pyrevitlabs/pyRevit (github.com)

give it a couple of days.

@tayOthman Thank you! I saw that there was a new version number, so I figured that was the update @Jean-Marc was talking about. I will wait a couple more days! Thank you!

You will have to be a tad more generous

2 Likes

Couple != handful !=Bunch != Two

@Jean-Marc and @tayOthman, I downloaded the new WIP file this morning and got version 5.0.0.24254. I uninstalled all versions of pyRevit from my system. Installed the admin_signed version of 5.0.0.24254.
It works in 2025 but a couple of the tools that I tested had errors which I’ll include in the next replies.
Earlier versions of Revit have the same error as a week ago. Thanks for the new WIP, but it looks like I’m back to 4.8.16.24121 for the moment. I’ll keep my eyes out for updates. Thanks for all of your hard work!

Print Sheets Error in Revit 2025:

IronPython Traceback:
Traceback (most recent call last):
File “C:\Program Files\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Drawing Set.panel\Print Sheets.pushbutton\script.py”, line 39, in
File “C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\compat.py”, line 87, in get_value_func
AttributeError: ‘Application’ object has no attribute ‘is_newer_than’

Script Executor Traceback:
System.MissingMemberException: ‘Application’ object has no attribute ‘is_newer_than’
at IronPython.Runtime.Binding.PythonGetMemberBinder.FastErrorGet1.GetError(CallSite site, TSelfType target, CodeContext context) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Runtime\Binding\PythonGetMemberBinder.cs:line 180 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at IronPython.Compiler.Ast.DynamicGetMemberExpression.GetMemberInstruction.Run(InterpretedFrame frame) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Compiler\Ast\DynamicGetMemberExpression.cs:line 99 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) in /_/Src/Microsoft.Dynamic/Interpreter/Interpreter.cs:line 91 at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0) in /_/Src/Microsoft.Dynamic/Interpreter/LightLambda.Generated.cs:line 55 at IronPython.Compiler.PythonCallTargets.OriginalCallTarget0(PythonFunction function) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Compiler\PythonCallTargets.cs:line 27 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Microsoft.Scripting.Interpreter.DynamicInstruction3.Run(InterpretedFrame frame) in //Src/Microsoft.Dynamic/Interpreter/Instructions/DynamicInstructions.Generated.cs:line 152
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) in /
/Src/Microsoft.Dynamic/Interpreter/Interpreter.cs:line 91
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) in //Src/Microsoft.Dynamic/Interpreter/LightLambda.Generated.cs:line 86
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Compiler\PythonScriptCode.cs:line 65
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Compiler\RuntimeScriptCode.cs:line 85
at Microsoft.Scripting.Hosting.CompiledCode.Execute(ScriptScope scope) in /
/Src/Microsoft.Scripting/Hosting/CompiledCode.cs:line 63
at PyRevitLabs.PyRevit.Runtime.IronPythonEngine.Execute(ScriptRuntime& runtime)

Renumber Error:

IronPython Traceback:
Traceback (most recent call last):
File “C:\Program Files\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Modify.panel\edit2.stack\ReNumber.pushbutton\script.py”, line 353, in
File “C:\Program Files\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Modify.panel\edit2.stack\ReNumber.pushbutton\script.py”, line 24, in init
File “C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\revit\db\query.py”, line 801, in get_category
NameError: global name ‘value_func’ is not defined

Script Executor Traceback:
IronPython.Runtime.UnboundNameException: global name ‘value_func’ is not defined
at IronPython.Compiler.PythonGlobal.GetCachedValue(Boolean lightThrow) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Compiler\PythonGlobal.cs:line 92
at IronPython.Compiler.PythonGlobalInstruction.Run(InterpretedFrame frame) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Compiler\PythonGlobalVariableExpression.cs:line 155
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) in //Src/Microsoft.Dynamic/Interpreter/Interpreter.cs:line 91
at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2) in /
/Src/Microsoft.Dynamic/Interpreter/LightLambda.Generated.cs:line 119
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame) in /_/Src/Microsoft.Dynamic/Interpreter/Instructions/DynamicInstructions.Generated.cs:line 177 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) in /_/Src/Microsoft.Dynamic/Interpreter/Interpreter.cs:line 91 at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) in /_/Src/Microsoft.Dynamic/Interpreter/LightLambda.Generated.cs:line 154 at IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction function, Object arg0, Object arg1, Object arg2) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Compiler\PythonCallTargets.cs:line 42 at Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame) in //Src/Microsoft.Dynamic/Interpreter/Instructions/CallInstruction.Generated.cs:line 774
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) in /
/Src/Microsoft.Dynamic/Interpreter/Interpreter.cs:line 91
at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) in //Src/Microsoft.Dynamic/Interpreter/LightLambda.Generated.cs:line 191
at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at IronPython.Runtime.Types.LateBoundInitBinder.FastInitSite1.CallTarget(CallSite site, CodeContext context, Object inst, T0 arg0) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Runtime\Types\PythonType.Generated.cs:line 863 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at IronPython.Runtime.Types.PythonType.FastTypeSite1.CallTarget(CallSite site, CodeContext context, Object type, T0 arg0) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Runtime\Types\PythonType.Generated.cs:line 321
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) in /
/Src/Microsoft.Dynamic/Interpreter/Instructions/DynamicInstructions.Generated.cs:line 177
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) in //Src/Microsoft.Dynamic/Interpreter/Interpreter.cs:line 91
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) in /
/Src/Microsoft.Dynamic/Interpreter/LightLambda.Generated.cs:line 86
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Compiler\PythonScriptCode.cs:line 65
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) in D:\a\pyRevit\pyRevit\dev\modules\pyRevitLabs.IronPython2\Src\IronPython\Compiler\RuntimeScriptCode.cs:line 85
at Microsoft.Scripting.Hosting.CompiledCode.Execute(ScriptScope scope) in /_/Src/Microsoft.Scripting/Hosting/CompiledCode.cs:line 63
at PyRevitLabs.PyRevit.Runtime.IronPythonEngine.Execute(ScriptRuntime& runtime)

This one “works” on all versions

@Jean-Marc, what do you mean by ““works” on all versions”? Do you mean all the apps work fine in 2021-2024, and perhaps some of the apps in 2025?

Also, why would an older version 5.0.0.24229 work better than a newer version 5.0.0.24254?

Some of the latest changes (since August 16th) broke some of the things that were working previously.
This version works (launches and display tools) from 2017-2025 and some stuffs are not fixed yet but it is bearable imho

2 Likes

@Jean-Marc thank you! That definitely seems to be working better. No errors upon start up in any of the versions. I have not had a chance to test everything yet, so basically just one question: Are all of the tools working in versions 2021-2024?

yes, they haven’t been changed

1 Like

FYI if you want to use 4.8.16 for <2024 and 5.0 for 2025, after installing each in separate folders, using the command line:
add the clone if necessary using

path\to\4.6\pyrevit.exe clones add this <clone_name>
path\to\4.6\pyrevit.exe attach <clone_name> default 2020
path\to\4.6\pyrevit.exe attach <clone_name> default 2021
path\to\4.6\pyrevit.exe attach <clone_name> default 2022
path\to\4.6\pyrevit.exe attach <clone_name> default 2023
path\to\4.6\pyrevit.exe attach <clone_name> default 2024

and then for previt 5.0:

path\to\5.0\pyrevit.exe clones add this <clone_name>
path\to\5.0\pyrevit.exe attach <clone_name> default 2025

if you try and attach the older versions using the new pyrevit.exe, it will show “?” for the engine version and fail to load.
Here is my attachments when checked using 4.8.16 pyrevit.exe. Note the question marks for the engine version for 2025:

and this is how the exact same setup looks when checking with the pyrevit.exe from 5.0. Now the ? shows for everything except 2025

1 Like

What version of the CLI were you using to attach the different versions of pyRevit to Revit? I’m trying to go this route but it seems that the V4.8.15 of the CLI attaches pyRevits differently to Revit than how V5 of the CLI attaches pyRevits to Revit.

For example, when I go to attach pyRevit V5 (specifically 5.0.0.24255) to Revit 2025 using v4.8.16 of the CLI, I get the following popup when I launch Revit '25:
pyRevit-V5-2025-V4CLI
When attaching pyRevit v4.8.16 Revit 2023 (and other <2025 versions) using the v4.8.16, it works fine.

On the other hand, when I go to attach pyRevit v4.8.16 to Revit 2023 (and other <2025 versions) using the V5 CLI, I get the below error when launching Revit.
pyRevit-V4-2023-V5CLI
And when attaching pyRevit V5 to Revit 2025 with the V5 CLI, it works fine.