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]: Trackback error when opening settings #2312

Closed Akhman17 closed 2 weeks ago

Akhman17 commented 4 months ago

✈ Pre-Flight checks

🐞 Describe the bug

When I try to run the settings function for pyrevit. A new window pops up showing there is a trackback error. It also lists scripts that are in error

⌨ Error/Debug Message

IronPython Traceback:
Traceback (most recent call last):
 File "C:\Program Files\pyRevit-Master\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Settings.smartbutton\script.py", line 986, in <module>
 File "C:\Program Files\pyRevit-Master\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Settings.smartbutton\script.py", line 105, in __init__
 File "C:\Program Files\pyRevit-Master\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Settings.smartbutton\script.py", line 209, in _setup_uiux
 File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\revit\tabs.py", line 108, in get_tabcoloring_theme
 File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\revit\tabs.py", line 49, in _get_tab_orderrules
 File "C:\Program Files\pyRevit-Master\pyrevitlib\pyrevit\revit\tabs.py", line 13, in hex_to_brush
SystemError: Token is not valid.

Script Executor Traceback:
System.FormatException: Token is not valid.
 at MS.Internal.Parsers.ParseColor(String color, IFormatProvider formatProvider, ITypeDescriptorContext context)
 at System.Windows.Media.ColorConverter.ConvertFromString(String value)
 at Microsoft.Scripting.Interpreter.FuncCallInstruction`2.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 Microsoft.Scripting.Interpreter.DynamicInstruction`4.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 Microsoft.Scripting.Interpreter.DynamicInstruction`4.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 Microsoft.Scripting.Interpreter.DynamicInstruction`4.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 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)
 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
 at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
 at IronPython.Runtime.Method.MethodBinding.SelfTarget(CallSite site, CodeContext context, Object target)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
 at Microsoft.Scripting.Interpreter.DynamicInstruction`3.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.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
 at IronPython.Runtime.Types.LateBoundInitBinder.FastInitSite`1.CallTarget(CallSite site, CodeContext context, Object inst, T0 arg0)
 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
 at IronPython.Runtime.Types.PythonType.FastTypeSite`1.CallTarget(CallSite site, CodeContext context, Object type, T0 arg0)
 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)
 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)

♻️ To Reproduce

  1. Go to pyrevit tab
  2. Click Pyrevit drop down under "Reload"
  3. click on "Settings"

⏲️ Expected behavior

No response

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

C:\Users\HP>pyrevit env
==> Registered Clones (full git repos)
==> Registered Clones (deployed from archive/image)
==> Attachments
Unknown | Product: "2024 First Customer Ship" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2024\pyRevit.addin"
Unknown | Product: "2023 First Customer Ship" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2023\pyRevit.addin"
Unknown | Product: "2020.2 (Update)" | Manifest: "C:\ProgramData\Autodesk\Revit\Addins\2020\pyRevit.addin"
==> Installed Extensions
==> Default Extension Search Path
C:\Users\HP\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
2024 First Customer Ship | Version: 24.0.4.427 | Build: 20230308_1635(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2024\"
2023 First Customer Ship | Version: 23.0.1.318 | Build: 20220304_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2023\"
2020.2 (Update) | Version: 20.2.0.48 | Build: 20191031_1115(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020\"
==> Running Revit Instances
PID: 35196 | 2024 First Customer Ship | Version: 24.0.4.427 | Build: 20230308_1635(x64) | Language: 0 | Path: "C:\Program Files\Autodesk\Revit 2024"
==> User Environment
Microsoft Windows 10 [Version 10.0.19045]
Executing User: ADMINISTRATOR\HP
Active User: ADMINISTRATOR\HP
Admin Access: No
%APPDATA%: "C:\Users\HP\AppData\Roaming"
Latest Installed .Net Framework: 4.8
No .Net Target Packs are installed.
Installed .Net-Core Target Packs: v6.0.203
pyRevit CLI v4.8.16.24121+2117.23a0b8cbc4babdeb29a0611e159d017bbe9cbad5

Additional context

No response

czwangxtt commented 4 months ago

We have seen a similar issue and fixed it following these steps. We don't need to restart the computer to get it to work. https://github.com/pyrevitlabs/pyRevit/issues/2270#issuecomment-2175037609

sanzoghenzo commented 4 months ago

It seems that there are some problems with the tab coloring, try to see if the second option of https://github.com/pyrevitlabs/pyRevit/issues/1196#issuecomment-805216874 solves the problem

github-actions[bot] commented 4 weeks ago

"👋 Hi there! It looks like there hasn't been any activity on this issue for the past 60 days. We understand that things can get busy. Just a friendly reminder that this issue is scheduled to be automatically closed in 14 days if there's no further activity. If you still need assistance or have additional information to share, please feel free to comment, and we'll be happy to help! 🚀 Thanks for your understanding!"

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.