Code Block not working - Python code crash


#1

Hello to everyone! I need the help of experts.

I am experiencing this since a couple of week (maybe more):
the code block does not let me input any code, the editable part is grayed out. I also noticed a very low loading of the software when launched.
Even more when I try to edit a Python block, Dynamo immediately crashes.

This happens in both in Dynamo 1.3 and 2.0 (the latest relaease 1.3.4. and 2.0.2) both reinstalled recentely (in vain)

I have found something maybe related to but the solution was posted 2 years ago

I am using revit 2018.3.1 and Windows 10

This is the python error message:

Set connectionId threw an exception.

at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at PythonNodeModelsWpf.ScriptEditorWindow…ctor(DynamoViewModel dynamoViewModel, PythonNode nodeModel, NodeView nodeView, WindowRect& windowRect)
at PythonNodeModelsWpf.PythonNodeViewCustomization.EditScriptContent()
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Any suggestions?


#2

Try unloading all add-ins and see if that works.


#3

I would first try updating to the latest pyrevit - please also look at those green notifications in dynamo’s menu.


#4

I solved by renaming the Avalon.Edit.dll in the SDA folder as suggested in the mentioned topic and finally it works!
By the way I still don’t know which addins made this collision (not PyRevit)