Install my own extention fails

Ive watched this video:

I have decided on method two and want my tools to be listed as an extension. This also works, but then an error message appears:

IronPython Traceback:
Traceback (most recent call last):
File “C:\Users\faust\AppData\Roaming\pyRevit-Master\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Extensions.smartbutton\script.py”, line 468, in
File “C:\Users\faust\AppData\Roaming\pyRevit-Master\pyrevitlib\pyrevit\forms_init_.py”, line 293, in show_dialog
File “C:\Users\faust\AppData\Roaming\pyRevit-Master\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Extensions.smartbutton\script.py”, line 353, in update_ext_info
File “C:\Users\faust\AppData\Roaming\pyRevit-Master\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Extensions.smartbutton\script.py”, line 184, in _update_ext_info_panel
SystemError: Ungültiger URI: Der Hostname konnte nicht analysiert werden.

Script Executor Traceback:
System.UriFormatException: Ungültiger URI: Der Hostname konnte nicht analysiert werden.
bei Microsoft.Scripting.Interpreter.NewInstruction.Run(InterpretedFrame frame)
bei Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
bei Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)
bei Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame) bei Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) bei Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2) bei IronPython.Runtime.Method.MethodBinding1.SelfTarget(CallSite site, CodeContext context, Object target, T0 arg0)
bei Microsoft.Scripting.Interpreter.DynamicInstruction4.Run(InterpretedFrame frame) bei Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) bei Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) bei CallSite.Target(Closure , CallSite , Object , Object , SelectionChangedEventArgs ) bei _Scripting_(Object[] , Object , SelectionChangedEventArgs ) bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) bei System.Windows.Controls.ListBox.OnSelectionChanged(SelectionChangedEventArgs e) bei System.Windows.Controls.Primitives.Selector.SelectionChanger.End() bei System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(ItemInfo info, Boolean assumeInItemsCollection) bei System.Windows.Controls.ListBox.MakeSingleSelection(ListBoxItem listItem) bei System.Windows.Controls.ListBoxItem.HandleMouseButtonDown(MouseButton mouseButton) bei System.Windows.Controls.ListBoxItem.OnMouseLeftButtonDown(MouseButtonEventArgs e) bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) bei System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e) bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) bei System.Windows.Input.InputManager.ProcessStagingArea() bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) bei System.Windows.Window.ShowHelper(Object booleanBox) bei System.Windows.Window.ShowDialog() bei Microsoft.Scripting.Interpreter.FuncCallInstruction2.Run(InterpretedFrame frame)
bei Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
bei Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
bei Microsoft.Scripting.Interpreter.DynamicInstruction3.Run(InterpretedFrame frame) bei Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) bei Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) bei System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) bei IronPython.Runtime.Method.MethodBinding.SelfTarget(CallSite site, CodeContext context, Object target) bei System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) bei Microsoft.Scripting.Interpreter.DynamicInstruction3.Run(InterpretedFrame frame)
bei Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
bei Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
bei IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
bei PyRevitLabs.PyRevit.Runtime.IronPythonEngine.Execute(ScriptRuntime& runtime)

what am I doing wrong?

Hi @Manuel486 ,
It’s difficult for us to tell what’s wrong without looking at your code/files!

The error points to an invalid address in the “url” field of the extensions.json file.

Care to share your extensions.json content?

extension.json

 {
     "builtin": "False",
     "default_enabled": "True",
     "type": "extension",
     "rocket_mode_compatible": "False",
     "name": "KD_Tools",
     "description": "Sammlung hilfreicher Tools für die CAD-Abteilung K. Dörflinger Elektroplanung",
     "author": "Manuel Faust",
     "author_profile": "https://github.com/Manuel-486",
     "url": "https://github.com/Manuel-486/KD_Tools.git",
     "website": "//https://www.elektroplanung-doerflinger.de",
     "image": "",
     "dependencies": []
 }

I think ive got it… i wrote extension… the “s” is missing… my fault…

Some things I see from there:

  • “author_profile” is not set to a url, but it might be the editor that changed this to an url; as a reminder, code and file contents in this forum should be enclosed in triple backtics (```), put them the line before and after the code
  • the “url” you specified doesn’t exist! If you don’t want to put the code into the repository, just leave the url empty ("url": "")
  • the “website” field starts with two slashes (‘//’) that make the url invalid, remove them
2 Likes

The // killed the code. Without the // it works.

It doesn’t matter whether I write extension or extensions. Only the ending .json is important.

Thanks a lot.

1 Like