Menu

"Open Python Script Editor" gives error "Object reference not set to an instance of an object"

2019-12-15
2019-12-24
  • Mehul Sutariya

    Mehul Sutariya - 2019-12-15

    Whenever I click on open python script editor; error "Object reference not set to an instance of an object." occure.
    I already installed ironpython, as well as I also set path for that.
    I use the latest version on DWSIM on windows 10 with classic UI.
    In cross platfrom it work perfact.

    System.NullReferenceException: Object reference not set to an instance of an object.
       at DWSIM.UnitOperations.EditingForm_CustomUO_ScriptEditor.btnHighlightSpaces_Click(Object sender, EventArgs e) in C:\Users\Daniel\source\repos\DanWBR\dwsim5\DWSIM.UnitOperations\Editing Forms\Supporting\EditingForm_CustomUO_ScriptEditor.vb:line 305
       at System.Windows.Forms.ToolStripButton.OnCheckedChanged(EventArgs e)
       at System.Windows.Forms.ToolStripButton.set_CheckState(CheckState value)
       at System.Windows.Forms.ToolStripButton.set_Checked(Boolean value)
       at DWSIM.UnitOperations.EditingForm_CustomUO_ScriptEditor.InitializeComponent() in C:\Users\Daniel\source\repos\DanWBR\dwsim5\DWSIM.UnitOperations\Editing Forms\Supporting\EditingForm_CustomUO_ScriptEditor.designer.vb:line 202
       at DWSIM.UnitOperations.EditingForm_CustomUO.Button1_Click(Object sender, EventArgs e) in C:\Users\Daniel\source\repos\DanWBR\dwsim5\DWSIM.UnitOperations\Editing Forms\EditingForm_CustomUO.vb:line 564
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
     
    • Mario Cilento

      Mario Cilento - 2019-12-23

      I have the same error. Don't find how to start scripting a Python-UO from 0.
      But as you have said, from Cross-platform I am able to write the python script.

      Maybe it is the same if add a new script in "script editor" and link it the Python UO object?

       

      Last edit: Mario Cilento 2019-12-23
  • Samya

    Samya - 2019-12-15

    Hey,
    I've a small clarification while waiting the reply of experts.
    Normally you don't need to install Ironpython (it is already integrated in the simulator).
    But in case you need to work with external libraries of Python, you should install a compatible version of Python and add the path of it in the General Settings (I'm working with Python 3.6 and DWSIM 5.7 update 5).
    Best of luck,

     
  • Daniel Medeiros

    Daniel Medeiros - 2019-12-23

    Please download the installers for v5.8 Update 5 again, I've fixed this error just now: https://sourceforge.net/projects/dwsim/files/DWSIM/DWSIM%205.8/Update%205/

    The fixed build version number is 5.8.7296.34218.

     
    • Mehul Sutariya

      Mehul Sutariya - 2019-12-24

      Thank you Daniel.
      Now it is working perfectly on classic UI.

       
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.