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]: Pyrevit load on revit 2020 but not revit 2022 #2165

Closed
5 tasks done
Kaankrby opened this issue Mar 17, 2024 · 8 comments
Closed
5 tasks done

[Bug]: Pyrevit load on revit 2020 but not revit 2022 #2165

Kaankrby opened this issue Mar 17, 2024 · 8 comments
Labels
Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class] needs-more-info Issue required to follow the bug report template. Triggered by the stale issue workflow

Comments

@Kaankrby
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

I installed last version of PyRevit. it works well on revit 2020 but not loading on 2023 and 2024.
In appData/roaming/2024 folder, runtime.dll was 0 kb i copied it from 2020 folder and reopen revit. its loads with error.
pyRevit_2024_19836_runtime.log
This is the debugged log file.

errorr
And the error while opening the revit 2024

⌨ Error/Debug Message

after copying runtime dll from 2020 to 2024 folder and changed the name, its opens and the script are working.

♻️ To Reproduce

No response

⏲️ Expected behavior

No response

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

C:\Users\Kaan Karabay>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
master | Deploy: "basepublic" | Branch: "master" | Version: "4.8.14.24016+1909" | Path: "C:\Program Files\pyRevit-Master"
==> Attachments
master | Product: "24.2" | Engine: IPY277 (277) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "23.1.3" | Engine: IPY277 (277) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "2020.2.9" | Engine: IPY277 (277) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "2019 First Customer Ship" | Engine: IPY277 (277) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
==> Installed Extensions
Parametrically | Type: Unknown | Repo: "" | Installed: "C:\Users\Kaan Karabay\Documents\MyExtensions\Parametrically.extension"
pyArchitect | Type: UIExtension | Repo: "https://github.com/romangolev/pyArchitect.git" | Installed: "C:\Users\Kaan Karabay\Documents\MyExtensions\pyArchitect.extension"
==> Default Extension Search Path
C:\Users\Kaan Karabay\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
C:\Users\Kaan Karabay\Documents\MyExtensions
==> 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\"
23.1.3 | Version: 23.1.30.97 | Build: 20230828_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023\"
2020.2.9 | Version: 20.2.90.12 | Build: 20220517_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020\"
2019 First Customer Ship | Version: 19.0.0.405 | Build: 20180216_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2019\"
==> Running Revit Instances
PID: 10140 | 24.2 | Version: 24.2.0.63 | Build: 20231029_1515(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2024"
PID: 39044 | 2020.2.9 | Version: 20.2.90.12 | Build: 20220517_1515(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2020"
==> User Environment
Microsoft Windows 10 [Version 10.0.22621]
Executing User: KAANKARABAY\Kaan Karabay
Active User: KAANKARABAY\Kaan Karabay
Admin Access: No
%APPDATA%: "C:\Users\Kaan Karabay\AppData\Roaming"
Latest Installed .Net Framework: 4.8
No .Net Target Packs are installed.
Installed .Net-Core Target Packs: v8.0.203
pyRevit CLI v4.8.14.24016+1909.ee814ee2f686d23db8bb6ff80d8bb918ff9adc99

Additional context

No response

@Kaankrby Kaankrby added the Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class] label Mar 17, 2024
@Kaankrby
Copy link
Author

Still gets errors on script console

IronPython Traceback:
Traceback (most recent call last):
File "C:\Program Files\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Project.panel\Preflight Checks.pushbutton\script.py", line 38, in
File "C:\Program Files\pyRevit-Master\extensions\pyRevitTools.extension\pyRevit.tab\Project.panel\Preflight Checks.pushbutton\script.py", line 32, in ask_for_preflight_checks
File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\preflight_init_.py", line 69, in run_preflight_check
File "C:\Program Files\pyRevit-Master\extensions\pyRevitTools.extension\checks\modelchecker_check.py", line 1241, in startTest
File "C:\Program Files\pyRevit-Master\extensions\pyRevitTools.extension\checks\modelchecker_check.py", line 1167, in checkModel
AttributeError: 'NoneType' object has no attribute 'Name'

Script Executor Traceback:
System.MissingMemberException: 'NoneType' object has no attribute 'Name'
at Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at IronPython.Compiler.Ast.DynamicGetMemberExpression.GetMemberInstruction.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.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Microsoft.Scripting.Interpreter.FuncCallInstruction7.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) at IronPython.Compiler.Ast.CallExpression.Invoke2Instruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction function, Object arg0, Object arg1, Object arg2) at Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run6[T0,T1,T2,T3,T4,T5,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
at Microsoft.Scripting.Interpreter.FuncCallInstruction8.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run6[T0,T1,T2,T3,T4,T5,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) at Microsoft.Scripting.Interpreter.DynamicInstruction6.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Microsoft.Scripting.Interpreter.DynamicInstruction5.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction function, Object arg0, Object arg1, Object arg2) at Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run6[T0,T1,T2,T3,T4,T5,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
at Microsoft.Scripting.Interpreter.DynamicInstruction6.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 Microsoft.Scripting.Interpreter.DynamicInstruction3.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at PyRevitLabs.PyRevit.Runtime.IronPythonEngine.Execute(ScriptRuntime& runtime)

@petersmithfromengland
Copy link

petersmithfromengland commented Mar 18, 2024

I'm not sure if I'm being super unhelpful here butttt I'm also getting the same experience of it working fine in versions 2021 and earlier but not 2022 or later.

However, I'm getting a different error message than the above. Mine is the below

image

Heres my env info

image

Hope this helps. Let me know if you want any more info

@sanzoghenzo
Copy link
Contributor

[x] I already followed the installation troubleshooting guide thoroughly

Did you really follow the troubleshooting guide?
One of the first thing to try is to attach the 2711 ironpython engine, but your logs clearly show that you're still on 277.

@Kaankrby
Copy link
Author

Still not working.
i made it before but uninstalled and reinstalled pyrevit maybe it changed again.

C:\Windows\System32>pyrevit attached
==> Attachments
master | Product: "24.2" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers
master | Product: "23.1.3" | 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
master | Product: "2019 First Customer Ship" | Engine: DEFAULT (2711) | Path: "C:\Program Files\pyRevit-Master" | AllUsers

1
2

@Kaankrby
Copy link
Author

On one of our PCs, it was working well, and that PC upgraded to Windows 11. After the installation, and a few more runs, it's not working now.
Also, the last version of Twinmotion for Revit is installed too.

This PC is fomatted, and all the apps were installed a day ago.
Windows 11 was upgraded from Windows 10.

@jmcouffin
Copy link
Contributor

@Kaankrby

  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:
    1. %AppData%\Autodesk\Revit\Addins<year>
    2. %AppData%\Autodesk\ApplicationPlugins
    3. %ProgramData%\Autodesk\Revit\Addins<year>
    4. %ProgramData%\Autodesk\ApplicationPlugins
  4. [Reboot computer]
  5. Reinstall pyRevit
  6. Started each version of Revit confirming pyRevit successfully compiled at startup.
  7. Moved all Revit addins that were moved in step 3 back to their original location.
    1. 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.

@github-actions github-actions bot added the needs-more-info Issue required to follow the bug report template. Triggered by the stale issue workflow label Mar 26, 2024
@Kaankrby
Copy link
Author

This issue is solved.
After deleting all extensions from folder and reinstalling solved my all the problems both PCs.

Thanks

@jmcouffin
Copy link
Contributor

thanks for the feedback. I hope this will be helpful for others.

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] needs-more-info Issue required to follow the bug report template. Triggered by the stale issue workflow
Projects
None yet
Development

No branches or pull requests

4 participants