I just changed my workstation and I am now operating on Windows 10 Pro, using Microsoft Visual Studio 2019.
Both my old code or the example code snippet to create a flowsheet using Python give the same error:
Message=Could not load file or assembly 'DWSIM.UI.Desktop, Version=7.5.5.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at DWSIM.Automation.Automation2..ctor()
Source=C:\Users\alfonso.villegas\source\repos\PythonApplication2\PythonApplication2\PythonApplication2.py
StackTrace:
File "C:\Users\alfonso.villegas\source\repos\PythonApplication2\PythonApplication2\PythonApplication2.py", line 35, in <module> (Current frame)
interf = Automation2()</module>
Could you help me with this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am unfortunately still blocked on this issue... I've tried looking for ways to solve this for the past few days but I have not made any progress. I would really appreciate any hint on how to solve this.
Here are a few more information from the Assembly binding log:
Message=Could not load file or assembly 'DWSIM.UI.Desktop, Version=7.5.5.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'DWSIM.UI.Desktop, Version=7.5.5.0, Culture=neutral, PublicKeyToken=null'
at DWSIM.Automation.Automation2..ctor()
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Users\alfonso.villegas\AppData\Local\Programs\Python\Python36-32\pythonw.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = DWSIM.UI.Desktop, Version=7.5.5.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/Users/alfonso.villegas/AppData/Local/Programs/Python/Python36-32/
LOG: Initial PrivatePath = NULL
Calling assembly : DWSIM.Automation, Version=7.5.5.0, Culture=neutral, PublicKeyToken=null.
===**
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/Programs/Python/Python36-32/DWSIM.UI.Desktop.DLL.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/Programs/Python/Python36-32/DWSIM.UI.Desktop/DWSIM.UI.Desktop.DLL.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/Programs/Python/Python36-32/DWSIM.UI.Desktop.EXE.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/Programs/Python/Python36-32/DWSIM.UI.Desktop/DWSIM.UI.Desktop.EXE.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/DWSIM7/DWSIM.UI.Desktop.DLL.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/DWSIM7/DWSIM.UI.Desktop/DWSIM.UI.Desktop.DLL.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/DWSIM7/DWSIM.UI.Desktop.EXE.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/DWSIM7/DWSIM.UI.Desktop/DWSIM.UI.Desktop.EXE.
Source=C:\Users\alfonso.villegas\source\repos\PythonApplication2\PythonApplication2\PythonApplication2.py
StackTrace:
File "C:\Users\alfonso.villegas\source\repos\PythonApplication2\PythonApplication2\PythonApplication2.py", line 35, in <module> (Current frame)
interf = Automation2()</module>
Thanks a lot,
Alfonso
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I just changed my workstation and I am now operating on Windows 10 Pro, using Microsoft Visual Studio 2019.
Both my old code or the example code snippet to create a flowsheet using Python give the same error:
Message=Could not load file or assembly 'DWSIM.UI.Desktop, Version=7.5.5.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at DWSIM.Automation.Automation2..ctor()
Source=C:\Users\alfonso.villegas\source\repos\PythonApplication2\PythonApplication2\PythonApplication2.py
StackTrace:
File "C:\Users\alfonso.villegas\source\repos\PythonApplication2\PythonApplication2\PythonApplication2.py", line 35, in <module> (Current frame)
interf = Automation2()</module>
Could you help me with this?
Hello,
I am unfortunately still blocked on this issue... I've tried looking for ways to solve this for the past few days but I have not made any progress. I would really appreciate any hint on how to solve this.
Here are a few more information from the Assembly binding log:
Message=Could not load file or assembly 'DWSIM.UI.Desktop, Version=7.5.5.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'DWSIM.UI.Desktop, Version=7.5.5.0, Culture=neutral, PublicKeyToken=null'
at DWSIM.Automation.Automation2..ctor()
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable C:\Users\alfonso.villegas\AppData\Local\Programs\Python\Python36-32\pythonw.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = DWSIM.UI.Desktop, Version=7.5.5.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/Users/alfonso.villegas/AppData/Local/Programs/Python/Python36-32/
LOG: Initial PrivatePath = NULL
Calling assembly : DWSIM.Automation, Version=7.5.5.0, Culture=neutral, PublicKeyToken=null.
===**
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/Programs/Python/Python36-32/DWSIM.UI.Desktop.DLL.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/Programs/Python/Python36-32/DWSIM.UI.Desktop/DWSIM.UI.Desktop.DLL.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/Programs/Python/Python36-32/DWSIM.UI.Desktop.EXE.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/Programs/Python/Python36-32/DWSIM.UI.Desktop/DWSIM.UI.Desktop.EXE.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/DWSIM7/DWSIM.UI.Desktop.DLL.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/DWSIM7/DWSIM.UI.Desktop/DWSIM.UI.Desktop.DLL.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/DWSIM7/DWSIM.UI.Desktop.EXE.
LOG: Attempting download of new URL file:///C:/Users/alfonso.villegas/AppData/Local/DWSIM7/DWSIM.UI.Desktop/DWSIM.UI.Desktop.EXE.
Source=C:\Users\alfonso.villegas\source\repos\PythonApplication2\PythonApplication2\PythonApplication2.py
StackTrace:
File "C:\Users\alfonso.villegas\source\repos\PythonApplication2\PythonApplication2\PythonApplication2.py", line 35, in <module> (Current frame)
interf = Automation2()</module>
Thanks a lot,
Alfonso
Did you set
correctly?
Hi Daniel,
Yes, I set it to the right folder, the code can access all the .dll files that I reference, the error occurs only when I call interf = Automation2().
This is my code:
Last edit: Alfonso Villegas 2022-06-07
maybe DWSIM is blocked by Windows. Try opening DWSIM.UI.Desktop.exe manually.
Yes, I can open DWSIM.UI.Desktop.exe manually.
Hello,
So the issue was that the installed Python interpreter on the workstation was 32-bit instead of 64-bit. Now everything works!