Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error loading PyRevit in only Revit 2024 #2528

Closed
5 tasks done
ntoyisea opened this issue Jan 20, 2025 · 8 comments
Closed
5 tasks done

[Bug]: Error loading PyRevit in only Revit 2024 #2528

ntoyisea opened this issue Jan 20, 2025 · 8 comments
Labels
Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class]

Comments

@ntoyisea
Copy link

✈ 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

Revit 2024 gives an error when opening about pyrevit. I tried following the steps on forum with IT but didnt work.

⌨ Error/Debug Message

Failed to initialize the add-in "PyRevitLoader" because an application already exists with this AddInId node. The AddInId node is a Globally Unique Identifier (GUID) upsend to identify the add-in application. Revit already has an application registered with the indicated GUID

♻️ To Reproduce

No response

⏲️ Expected behavior

Image

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

C:\Users\athenkosi.ntoyise>pyrevit env
==> Registered Clones (full git repos)
Error: Could not load file or assembly 'MadMilkman.Ini, Version=1.0.6.0, Culture=neutral, PublicKeyToken=4e0b5157a7ffbb74' or one of its dependencies. The system cannot find the file specified.
Run with "--debug" option to see debug messages

Additional context

No response

@ntoyisea ntoyisea added the Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class] label Jan 20, 2025
@jmcouffin
Copy link
Contributor

What is the version of pyRevit that you are using?
It looks like you are using an old one.

@ntoyisea
Copy link
Author

What is the version of pyRevit that you are using? It looks like you are using an old one.

Thank you. I immediately updated my pyrevit but now a new error comes up

Image
Image
Image
Image
Image

@jmcouffin
Copy link
Contributor

I doubt you uninstalled properly before installing. I still see old references and old issues

In general, you need to uninstall pyrevit before installing a new version.

Please follow https://pyrevitlabs.notion.site/Installation-issues-f6495adb56254e9e8021f8a68e3b2ab7

@duckmiester
Copy link

I can confirm we are receiving the same issue in Revit 2024 all of a sudden. Has been working fine for ages, but now throwing this error.

[Window Title]
PyRevitLoader - Error Loading pyRevit

[Main Instruction]
IronPython Traceback:
Traceback (most recent call last):
File "C:\Program Files\pyRevit-Master\bin\engines\pyRevitLoader.py", line 30, in
File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\loader\sessionmgr.py", line 24, in
File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\loader\sessioninfo.py", line 14, in
File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\runtime_init_.py", line 502, in
File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\runtime_init_.py", line 344, in get_runtime_asm
File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\runtime_init
.py", line 295, in _generate_runtime_asm
AttributeError: Method not found: 'System.Collections.Immutable.ImmutableArray`1 System.Reflection.Metadata.MetadataReader.GetBlobContent(System.Reflection.Metadata.BlobHandle)'.

Script Executor Traceback:
System.MissingMethodException: Method not found: 'System.Collections.Immutable.ImmutableArray1<Byte> System.Reflection.Metadata.MetadataReader.GetBlobContent(System.Reflection.Metadata.BlobHandle)'. at Microsoft.Scripting.Runtime.LightExceptions.ThrowException(LightException lightEx) at Microsoft.Scripting.Runtime.LightExceptions.CheckAndThrow(Object value) at Microsoft.Scripting.Interpreter.FuncCallInstruction2.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.HandleException(InterpretedFrame frame, Exception exception)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
at IronPython.Compiler.Ast.CallExpression.Invoke0Instruction.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at IronPython.Compiler.Ast.CallExpression.Invoke0Instruction.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at IronPython.Runtime.PythonContext.InitializeModule(String fileName, ModuleContext moduleContext, ScriptCode scriptCode, ModuleOptions options)
at IronPython.Runtime.Importer.LoadModuleFromSource(CodeContext context, String name, String path)
at IronPython.Runtime.Importer.LoadFromDisk(CodeContext context, String name, String fullName, String str)
at IronPython.Runtime.Importer.ImportFromPathHook(CodeContext context, String name, String fullName, List path, Func5 defaultLoader) at IronPython.Runtime.Importer.ImportFromPath(CodeContext context, String name, String fullName, List path) at IronPython.Runtime.Importer.ImportNestedModule(CodeContext context, PythonModule module, String[] parts, Int32 current, List path) at IronPython.Runtime.Importer.ImportFrom(CodeContext context, Object from, String name) at IronPython.Modules.Builtin.__import__(CodeContext context, String name, Object globals, Object locals, Object fromlist, Int32 level) at IronPython.Runtime.Importer.ImportLightThrow(CodeContext context, String fullName, PythonTuple from, Int32 level) at Microsoft.Scripting.Interpreter.FuncCallInstruction5.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at IronPython.Runtime.PythonContext.InitializeModule(String fileName, ModuleContext moduleContext, ScriptCode scriptCode, ModuleOptions options)
at IronPython.Runtime.Importer.LoadModuleFromSource(CodeContext context, String name, String path)
at IronPython.Runtime.Importer.LoadFromDisk(Cod

@jmcouffin
Copy link
Contributor

@duckmiester do you mean you did not play with pyrevit installs and the errors just popped? (After an update of Revit at least)

Please report the output from running pyrevit env command in cli

@duckmiester
Copy link

@jmcouffin yep correct. Out of the blue! Led me down a rabbit hole of completely uninstalling / reinstalling to no avail.

pyrevit env results below

C:\WINDOWS\system32>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.16.24121+2117" | Path: "C:\Program Files\pyRevit-Master"
==> Attachments
master | Product: "Autodesk Revit 2025" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "Autodesk Revit 2024" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "Autodesk Revit 2023" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "Autodesk Revit 2022" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "2021.1.9" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "2020.2.9" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
==> Installed Extensions
==> Default Extension Search Path
C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
==> Extension Sources - Default
https://github.com/pyrevitlabs/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
Autodesk Revit 2025 | Version: 25.0.2.419 | Build: 20240307_1300(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2025"
Autodesk Revit 2024 | Version: 24.3.10.22 | Build: 20241105_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024"
Autodesk Revit 2023 | Version: 23.1.60.36 | Build: 20241107_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023"
Autodesk Revit 2022 | Version: 22.1.80.32 | Build: 20241107_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2022"
2021.1.9 | Version: 21.1.90.15 | Build: 20230907_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021"
2020.2.9 | Version: 20.2.90.12 | Build: 20220517_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020"
==> Running Revit Instances
Error: Object reference not set to an instance of an object.
Run with "--debug" option to see debug messages

@jmcouffin
Copy link
Contributor

Please uninstall old version and download WIP installers from the actions tab or from the https://pyrevitlabs.io website using the orange button and report.

@ntoyisea
Copy link
Author

I doubt you uninstalled properly before installing. I still see old references and old issues

In general, you need to uninstall pyrevit before installing a new version.

Please follow https://pyrevitlabs.notion.site/Installation-issues-f6495adb56254e9e8021f8a68e3b2ab7

It worked. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class]
Projects
None yet
Development

No branches or pull requests

3 participants