opened
gtalarico
username_0
## Version

1.3

## Operating system

Windows 10

## What did you do? 

Tried opening Python Node.

## What did you see instead?

```

Object reference not set to an instance of an object.

   at System.Windows.Baml2006.Baml2006Reader.Process_PropertyWithConverter()
   at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
   at System.Windows.Baml2006.Baml2006Reader.Process_BamlRecords()
   at System.Windows.Baml2006.Baml2006Reader.Read()
   at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
   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)
   at PythonNodeModelsWpf.PythonNodeViewCustomization.EditScriptContent()
   at PythonNodeModelsWpf.PythonNodeViewCustomization.view_MouseDown(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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)
```
Cannot Open Python Node
issue
created
jnealb
username_1
@username_0 Does this error still reproduce for you?
comment
created
pabloderen
username_2
Same issue with Dynamo 1.30.875
comment
created
jnealb
username_1
@username_2 What versions of Python are installed on your system?
comment
created
pabloderen
username_2
I had Python 3.6 and IronPython 2.7.7.
Everything worked after removing Python, Iron Python, PyRevit, Revit Python Shell and Dynamo (0.9 and 1.3). Once I removed all those, I reinstalled Dynamo 1.3, RPS and PyRevit - in that order - without problem. Same versions I had before.
comment
created
mjkkirschner
username_3
@username_0 have you tried this solution reported above?
comment
created
gtalarico
username_0
@username_3 I have not tried uninstalled RPS or pyrevit I do think the error is coming from a conflict in the ironpython assemblies. Here are the loaded assemblies I am picking up:

Could you have Dynamo specify which IronPython assembly version it's going to use?

```
IronPython, Version=2.7.7.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1,file:///C:/Users/username_0/AppData/Roaming/pyRevit/pyRevit-v4/pyRevit/pyrevitlib/pyrevit/loader/addin/IronPython.DLL
IronPython.Modules, Version=2.7.7.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1,file:///C:/Users/username_0/AppData/Roaming/pyRevit/pyRevit-v4/pyRevit/pyrevitlib/pyrevit/loader/addin/IronPython.Modules.DLL
DSIronPython, Version=1.3.0.875, Culture=neutral, PublicKeyToken=null,file:///C:/Program Files/Dynamo/Dynamo Core/1.3/DSIronPython.dll
IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1,file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/IronPython/v4.0_2.7.0.40__7f709c5b713576e1/IronPython.dll
IronPython.Modules, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1,file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/IronPython.Modules/v4.0_2.7.0.40__7f709c5b713576e1/IronPython.Modules.dll
```
comment
created
eirannejad
username_4
Or just ship dynamo with IronPython 2.7.7
It has a long list of improvements over the previous versions so it's all for a good cause :D
comment
created
gtalarico
username_0
This solution fixed it for me:
https://github.com/username_4/pyRevit/issues/231#issuecomment-324454892

But seems to me like it's a not a permanent fix, and it will continue to break for other people.

@username_1 looks like dynamo uses 2.7.0.4 - Does it load that exact version explicitly?
Is there a way for dynamo to specify the version it needs to avoid potential conflict with other addins that use a different ironpython version? (RevitPythonShell, pyRevit, etc)
Alternatively, is there a plan to update to 2.7.7?

Related Issues:
https://github.com/username_4/pyRevit/issues/216
https://github.com/DynamoDS/Dynamo/issues/8118
https://github.com/username_4/pyRevit/issues/231
https://github.com/username_4/pyRevit/issues/232
comment
created
jnealb
username_1
@username_0 @username_3 @smangarole Thanks for investigating this; no, there is no mechanism within Dynamo 1.3 to specify which Python version to use. We are discussing better Python support and will update you with our plans going forward.
comment
created
gtalarico
username_0
Not sure I explained it well, but I meant specifying the version in Dynamo's source code, 
not for the user - meaning, specifying the version when loading IronPython assembly reference
comment
created
jnealb
username_1
@username_3 Can you please comment?
comment
created
mjkkirschner
username_3
I've commented in the pyRevit repo - I actually think this has to do with avalonedit.dlls rather than   ironPython.
comment
created
jnealb
username_1
@username_3 Thanks.
comment
created
mjkkirschner
username_3
@username_1 keep an eye on this thread:
it may be ironPython after all, but it's odd because I believe semver wise we should have no problem.
https://github.com/username_4/pyRevit/issues/231#issuecomment-330901771
comment
created
jnealb
username_1
@username_0 This may be a collision with one of your installed Packages; which packages are listed under Manage...?
comment
created
Amoursol
username_5
Thank you for the submission of this Issue above - We very much do appreciate your time taken to look to improve Dynamo and help it grow and evolve into the future.

In order to better serve the active Dynamo user base and the evolving nature of Dynamo, the Dynamo team has made the decision to **close any issue that hasn't had activity since 1st January 2019**. This doesn't mean that these issues will not be addressed, but just that they are not being actively worked on as they do not align with our current [Dynamo Public Roadmap](https://github.com/DynamoDS/Dynamo/wiki/Dynamo-Public-Roadmap).

If this issue is still relevant to you and your workflows, please do re-submit in a new Github Issue and link to this closed issue for historical context.

Many thanks,
The Dynamo Team
comment
closed
Amoursol
username_5
issue