Hello all, please help me to resolve the following problem. I was trying a lot of things (see 1) and still didn't get it. There is also a project on freelancer for that (see 2): 1. http://stackoverflow.com/questions/40037684/adding-reference-to-net-assembly... 2. https://www.freelancer.com/contest/Write-some-Software-867914.html -- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
Hi Artem,
If clr.FindAssembly("isc.Eng.Hov") and clr.AddReference("isc.Eng.Hov") are
working fine, then you need to `import HovEngine`, but not `import
isc.Eng.Hov`.
This is assuming isc.Eng.Hov is assembly name, and HovEngine is namespace
name.
Thanks,
Denis
On Mon, Oct 17, 2016, 12:08 AM Artem Zhukov
Hello all, please help me to resolve the following problem. I was trying a lot of things (see 1) and still didn't get it. There is also a project on freelancer for that (see 2):
1. http://stackoverflow.com/questions/40037684/adding-reference-to-net-assembly... 2. https://www.freelancer.com/contest/Write-some-Software-867914.html
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 _________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
Denis,
1. from isc.Eng.Hov import * . Result: ImportError: No module named
isc.Eng.Hov
2. import HovEngine. Result: ImportError: No module named HovEngine
3. import isc.Eng.Hov.HovEngine. Result: ImportError: No module named
isc.Eng.Hov.HovEngine
4. from isc.Eng.Hov.HovEngine import *. Result ImportError: No module named
isc.Eng.Hov.HovEngine
I don't know where the mistake could be hidden. As I see from object
browser the namespace is HovEngine.
[image: unspecified.jpg]
Then, what's wrong?
On Mon, Oct 17, 2016 at 2:12 PM Denis Akhiyarov
I used ILSPY to inspect your dll and here is how you need to use it (just
tried and it works!):
In [1]: import clr
In [2]: import sys
In [3]:
sys.path.append(r"C:\Users\denis.akhiyarov\Downloads\TestEngine_Compile
...: d")
In [4]: clr.AddReference("isc.Eng.Hov")
Out[4]:
Denis,
1. from isc.Eng.Hov import * . Result: ImportError: No module named isc.Eng.Hov 2. import HovEngine. Result: ImportError: No module named HovEngine 3. import isc.Eng.Hov.HovEngine. Result: ImportError: No module named isc.Eng.Hov.HovEngine 4. from isc.Eng.Hov.HovEngine import *. Result ImportError: No module named isc.Eng.Hov.HovEngine
I don't know where the mistake could be hidden. As I see from object browser the namespace is HovEngine. [image: unspecified.jpg] Then, what's wrong?
On Mon, Oct 17, 2016 at 2:12 PM Denis Akhiyarov
wrote: Hi Artem,
If clr.FindAssembly("isc.Eng.Hov") and clr.AddReference("isc.Eng.Hov") are working fine, then you need to `import HovEngine`, but not `import isc.Eng.Hov`.
This is assuming isc.Eng.Hov is assembly name, and HovEngine is namespace name.
Thanks, Denis
On Mon, Oct 17, 2016, 12:08 AM Artem Zhukov
wrote: Hello all, please help me to resolve the following problem. I was trying a lot of things (see 1) and still didn't get it. There is also a project on freelancer for that (see 2):
1. http://stackoverflow.com/questions/40037684/adding- reference-to-net-assembly-which-has-dots-in-name-and-namespace http://stackoverflow.com/questions/40037684/adding-reference-to-net-assembly... 2. https://www.freelancer.com/contest/Write-some-Software-867914.html
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
On my machine:
In [6]: clr.AddReference("isc.Eng.Hov")
Out[6]:
I used ILSPY to inspect your dll and here is how you need to use it (just tried and it works!):
In [1]: import clr
In [2]: import sys
In [3]: sys.path.append(r"C:\Users\denis.akhiyarov\Downloads\TestEngine_Compile ...: d")
In [4]: clr.AddReference("isc.Eng.Hov") Out[4]:
In [5]: import isc.Eng.Hov
In [6]: from isc.Eng.Hov import *
On Mon, Oct 17, 2016 at 8:32 AM, Artem Zhukov
wrote: Denis,
1. from isc.Eng.Hov import * . Result: ImportError: No module named isc.Eng.Hov 2. import HovEngine. Result: ImportError: No module named HovEngine 3. import isc.Eng.Hov.HovEngine. Result: ImportError: No module named isc.Eng.Hov.HovEngine 4. from isc.Eng.Hov.HovEngine import *. Result ImportError: No module named isc.Eng.Hov.HovEngine
I don't know where the mistake could be hidden. As I see from object browser the namespace is HovEngine. [image: unspecified.jpg] Then, what's wrong?
On Mon, Oct 17, 2016 at 2:12 PM Denis Akhiyarov
wrote: Hi Artem,
If clr.FindAssembly("isc.Eng.Hov") and clr.AddReference("isc.Eng.Hov") are working fine, then you need to `import HovEngine`, but not `import isc.Eng.Hov`.
This is assuming isc.Eng.Hov is assembly name, and HovEngine is namespace name.
Thanks, Denis
On Mon, Oct 17, 2016, 12:08 AM Artem Zhukov
wrote: Hello all, please help me to resolve the following problem. I was trying a lot of things (see 1) and still didn't get it. There is also a project on freelancer for that (see 2):
1. http://stackoverflow.com/questions/40037684/adding-reference-to-net-assembly... 2. https://www.freelancer.com/contest/Write-some-Software-867914.html
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
In [6]: clr.AddReference("isc.Eng.Hov")
Out[6]:
On my machine: In [6]: clr.AddReference("isc.Eng.Hov") Out[6]:
In [7]: import isc.Eng.Hov --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-7-4f185d6b3880> in <module>() ----> 1 import isc.Eng.Hov
ImportError: No module named isc.Eng.Hov
On Mon, Oct 17, 2016 at 4:28 PM Denis Akhiyarov
wrote: I used ILSPY to inspect your dll and here is how you need to use it (just tried and it works!):
In [1]: import clr
In [2]: import sys
In [3]: sys.path.append(r"C:\Users\denis.akhiyarov\Downloads\TestEngine_Compile ...: d")
In [4]: clr.AddReference("isc.Eng.Hov") Out[4]:
In [5]: import isc.Eng.Hov
In [6]: from isc.Eng.Hov import *
On Mon, Oct 17, 2016 at 8:32 AM, Artem Zhukov
wrote: Denis,
1. from isc.Eng.Hov import * . Result: ImportError: No module named isc.Eng.Hov 2. import HovEngine. Result: ImportError: No module named HovEngine 3. import isc.Eng.Hov.HovEngine. Result: ImportError: No module named isc.Eng.Hov.HovEngine 4. from isc.Eng.Hov.HovEngine import *. Result ImportError: No module named isc.Eng.Hov.HovEngine
I don't know where the mistake could be hidden. As I see from object browser the namespace is HovEngine. [image: unspecified.jpg] Then, what's wrong?
On Mon, Oct 17, 2016 at 2:12 PM Denis Akhiyarov
wrote: Hi Artem,
If clr.FindAssembly("isc.Eng.Hov") and clr.AddReference("isc.Eng.Hov") are working fine, then you need to `import HovEngine`, but not `import isc.Eng.Hov`.
This is assuming isc.Eng.Hov is assembly name, and HovEngine is namespace name.
Thanks, Denis
On Mon, Oct 17, 2016, 12:08 AM Artem Zhukov
wrote: Hello all, please help me to resolve the following problem. I was trying a lot of things (see 1) and still didn't get it. There is also a project on freelancer for that (see 2):
1. http://stackoverflow.com/questions/40037684/adding-reference-to-net-assembly... 2. https://www.freelancer.com/contest/Write-some-Software-867914.html
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
are you on Linux and Mono? What python/Mono/pythonnet versions and
architecture?
On Mon, Oct 17, 2016 at 9:57 AM, Artem Zhukov
In [6]: clr.AddReference("isc.Eng.Hov") Out[6]:
In [7]: import isc.Eng.Hov ------------------------------------------------------------ --------------- ImportError Traceback (most recent call last) <ipython-input-7-4f185d6b3880> in <module>() ----> 1 import isc.Eng.Hov
ImportError: No module named isc.Eng.Hov
On Mon, Oct 17, 2016 at 4:56 PM Artem Zhukov
wrote: On my machine: In [6]: clr.AddReference("isc.Eng.Hov") Out[6]:
In [7]: import isc.Eng.Hov ------------------------------------------------------------ --------------- ImportError Traceback (most recent call last) <ipython-input-7-4f185d6b3880> in <module>() ----> 1 import isc.Eng.Hov
ImportError: No module named isc.Eng.Hov
On Mon, Oct 17, 2016 at 4:28 PM Denis Akhiyarov < denis.akhiyarov@gmail.com> wrote:
I used ILSPY to inspect your dll and here is how you need to use it (just tried and it works!):
In [1]: import clr
In [2]: import sys
In [3]: sys.path.append(r"C:\Users\denis.akhiyarov\Downloads\ TestEngine_Compile ...: d")
In [4]: clr.AddReference("isc.Eng.Hov") Out[4]:
In [5]: import isc.Eng.Hov
In [6]: from isc.Eng.Hov import *
On Mon, Oct 17, 2016 at 8:32 AM, Artem Zhukov
wrote: Denis,
1. from isc.Eng.Hov import * . Result: ImportError: No module named isc.Eng.Hov 2. import HovEngine. Result: ImportError: No module named HovEngine 3. import isc.Eng.Hov.HovEngine. Result: ImportError: No module named isc.Eng.Hov.HovEngine 4. from isc.Eng.Hov.HovEngine import *. Result ImportError: No module named isc.Eng.Hov.HovEngine
I don't know where the mistake could be hidden. As I see from object browser the namespace is HovEngine. [image: unspecified.jpg] Then, what's wrong?
On Mon, Oct 17, 2016 at 2:12 PM Denis Akhiyarov < denis.akhiyarov@gmail.com> wrote:
Hi Artem,
If clr.FindAssembly("isc.Eng.Hov") and clr.AddReference("isc.Eng.Hov") are working fine, then you need to `import HovEngine`, but not `import isc.Eng.Hov`.
This is assuming isc.Eng.Hov is assembly name, and HovEngine is namespace name.
Thanks, Denis
On Mon, Oct 17, 2016, 12:08 AM Artem Zhukov
wrote: Hello all, please help me to resolve the following problem. I was trying a lot of things (see 1) and still didn't get it. There is also a project on freelancer for that (see 2):
1. http://stackoverflow.com/questions/40037684/adding- reference-to-net-assembly-which-has-dots-in-name-and-namespace http://stackoverflow.com/questions/40037684/adding-reference-to-net-assembly... 2. https://www.freelancer.com/contest/Write-some-Software-867914.html
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
Ubuntu 16.4,
Python 2.7.12
Mono 4.2.4 (I used this to install
https://github.com/pythonnet/pythonnet/blob/master/.travis.yml)
pythonnet (2.2.0.dev1)
pythonnet is working correctly. I have another DLL and I able to refer to
it with no problems
On Mon, Oct 17, 2016 at 5:02 PM Denis Akhiyarov
are you on Linux and Mono? What python/Mono/pythonnet versions and architecture?
On Mon, Oct 17, 2016 at 9:57 AM, Artem Zhukov
wrote: In [6]: clr.AddReference("isc.Eng.Hov") Out[6]:
In [7]: import isc.Eng.Hov --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-7-4f185d6b3880> in <module>() ----> 1 import isc.Eng.Hov
ImportError: No module named isc.Eng.Hov
On Mon, Oct 17, 2016 at 4:56 PM Artem Zhukov
wrote: On my machine: In [6]: clr.AddReference("isc.Eng.Hov") Out[6]:
In [7]: import isc.Eng.Hov --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-7-4f185d6b3880> in <module>() ----> 1 import isc.Eng.Hov
ImportError: No module named isc.Eng.Hov
On Mon, Oct 17, 2016 at 4:28 PM Denis Akhiyarov
wrote: I used ILSPY to inspect your dll and here is how you need to use it (just tried and it works!):
In [1]: import clr
In [2]: import sys
In [3]: sys.path.append(r"C:\Users\denis.akhiyarov\Downloads\TestEngine_Compile ...: d")
In [4]: clr.AddReference("isc.Eng.Hov") Out[4]:
In [5]: import isc.Eng.Hov
In [6]: from isc.Eng.Hov import *
On Mon, Oct 17, 2016 at 8:32 AM, Artem Zhukov
wrote: Denis,
1. from isc.Eng.Hov import * . Result: ImportError: No module named isc.Eng.Hov 2. import HovEngine. Result: ImportError: No module named HovEngine 3. import isc.Eng.Hov.HovEngine. Result: ImportError: No module named isc.Eng.Hov.HovEngine 4. from isc.Eng.Hov.HovEngine import *. Result ImportError: No module named isc.Eng.Hov.HovEngine
I don't know where the mistake could be hidden. As I see from object browser the namespace is HovEngine. [image: unspecified.jpg] Then, what's wrong?
On Mon, Oct 17, 2016 at 2:12 PM Denis Akhiyarov
wrote: Hi Artem,
If clr.FindAssembly("isc.Eng.Hov") and clr.AddReference("isc.Eng.Hov") are working fine, then you need to `import HovEngine`, but not `import isc.Eng.Hov`.
This is assuming isc.Eng.Hov is assembly name, and HovEngine is namespace name.
Thanks, Denis
On Mon, Oct 17, 2016, 12:08 AM Artem Zhukov
wrote: Hello all, please help me to resolve the following problem. I was trying a lot of things (see 1) and still didn't get it. There is also a project on freelancer for that (see 2):
1. http://stackoverflow.com/questions/40037684/adding-reference-to-net-assembly... 2. https://www.freelancer.com/contest/Write-some-Software-867914.html
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
Let me post a quick update based on reply from Artem. I hope that he posts
more detailed answer tomorrow.
On Linux his DLL was missing some references that are available by default
on Windows. Adding this reference fixed his problem.
Perhaps we should improve error logging in pythonnet, if this information
is available to Mono/.NET runtime. I use fuslogvw.exe on Windows for these
assembly binding issues.
On Mon, Oct 17, 2016 at 10:55 AM, Artem Zhukov
Ubuntu 16.4, Python 2.7.12 Mono 4.2.4 (I used this to install https://github.com/ pythonnet/pythonnet/blob/master/.travis.yml) pythonnet (2.2.0.dev1)
pythonnet is working correctly. I have another DLL and I able to refer to it with no problems
On Mon, Oct 17, 2016 at 5:02 PM Denis Akhiyarov
wrote: are you on Linux and Mono? What python/Mono/pythonnet versions and architecture?
On Mon, Oct 17, 2016 at 9:57 AM, Artem Zhukov
wrote: In [6]: clr.AddReference("isc.Eng.Hov") Out[6]:
In [7]: import isc.Eng.Hov ------------------------------------------------------------ --------------- ImportError Traceback (most recent call last) <ipython-input-7-4f185d6b3880> in <module>() ----> 1 import isc.Eng.Hov
ImportError: No module named isc.Eng.Hov
On Mon, Oct 17, 2016 at 4:56 PM Artem Zhukov
wrote: On my machine: In [6]: clr.AddReference("isc.Eng.Hov") Out[6]:
In [7]: import isc.Eng.Hov ------------------------------------------------------------ --------------- ImportError Traceback (most recent call last) <ipython-input-7-4f185d6b3880> in <module>() ----> 1 import isc.Eng.Hov
ImportError: No module named isc.Eng.Hov
On Mon, Oct 17, 2016 at 4:28 PM Denis Akhiyarov < denis.akhiyarov@gmail.com> wrote:
I used ILSPY to inspect your dll and here is how you need to use it (just tried and it works!):
In [1]: import clr
In [2]: import sys
In [3]: sys.path.append(r"C:\Users\denis.akhiyarov\Downloads\ TestEngine_Compile ...: d")
In [4]: clr.AddReference("isc.Eng.Hov") Out[4]:
In [5]: import isc.Eng.Hov
In [6]: from isc.Eng.Hov import *
On Mon, Oct 17, 2016 at 8:32 AM, Artem Zhukov
wrote: Denis,
1. from isc.Eng.Hov import * . Result: ImportError: No module named isc.Eng.Hov 2. import HovEngine. Result: ImportError: No module named HovEngine 3. import isc.Eng.Hov.HovEngine. Result: ImportError: No module named isc.Eng.Hov.HovEngine 4. from isc.Eng.Hov.HovEngine import *. Result ImportError: No module named isc.Eng.Hov.HovEngine
I don't know where the mistake could be hidden. As I see from object browser the namespace is HovEngine. [image: unspecified.jpg] Then, what's wrong?
On Mon, Oct 17, 2016 at 2:12 PM Denis Akhiyarov < denis.akhiyarov@gmail.com> wrote:
Hi Artem,
If clr.FindAssembly("isc.Eng.Hov") and clr.AddReference("isc.Eng.Hov") are working fine, then you need to `import HovEngine`, but not `import isc.Eng.Hov`.
This is assuming isc.Eng.Hov is assembly name, and HovEngine is namespace name.
Thanks, Denis
On Mon, Oct 17, 2016, 12:08 AM Artem Zhukov
wrote: Hello all, please help me to resolve the following problem. I was trying a lot of things (see 1) and still didn't get it. There is also a project on freelancer for that (see 2):
1. http://stackoverflow.com/questions/40037684/adding- reference-to-net-assembly-which-has-dots-in-name-and-namespace http://stackoverflow.com/questions/40037684/adding-reference-to-net-assembly... 2. https://www.freelancer.com/contest/Write-some-Software-867914.html
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
Hello,
the solution was to use [ILSPY](http://ilspy.net/) to investigate the DLL
and find dependencies (right click recursively for each DLL). Then I copied
all the dependencies to the same folder where the main DLL was. After that,
I ran: <pre>print [a for a in clr.ListAssemblies(False)</pre> and get the
list of dependencies which are actually involved:
<pre>
u'isc.Eng.Hov', u'Microsoft.VisualBasic', u'System.Windows.Forms',
u'System.Drawing', u'Accessibility'
</pre>
and left them in the folder.
After doing so the part of code:
<pre>
sys.path.append(assemblyPath)
clr.AddReference("isc.Eng.Hov")
import isc.Eng.Hov as isk
from isk import *
</pre>
started work.
Thank you, Denis, for help!
On Mon, Oct 17, 2016 at 5:55 PM Artem Zhukov
Ubuntu 16.4, Python 2.7.12 Mono 4.2.4 (I used this to install https://github.com/pythonnet/pythonnet/blob/master/.travis.yml) pythonnet (2.2.0.dev1)
pythonnet is working correctly. I have another DLL and I able to refer to it with no problems
On Mon, Oct 17, 2016 at 5:02 PM Denis Akhiyarov
wrote: are you on Linux and Mono? What python/Mono/pythonnet versions and architecture?
On Mon, Oct 17, 2016 at 9:57 AM, Artem Zhukov
wrote: In [6]: clr.AddReference("isc.Eng.Hov") Out[6]:
In [7]: import isc.Eng.Hov --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-7-4f185d6b3880> in <module>() ----> 1 import isc.Eng.Hov
ImportError: No module named isc.Eng.Hov
On Mon, Oct 17, 2016 at 4:56 PM Artem Zhukov
wrote: On my machine: In [6]: clr.AddReference("isc.Eng.Hov") Out[6]:
In [7]: import isc.Eng.Hov --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-7-4f185d6b3880> in <module>() ----> 1 import isc.Eng.Hov
ImportError: No module named isc.Eng.Hov
On Mon, Oct 17, 2016 at 4:28 PM Denis Akhiyarov
wrote: I used ILSPY to inspect your dll and here is how you need to use it (just tried and it works!):
In [1]: import clr
In [2]: import sys
In [3]: sys.path.append(r"C:\Users\denis.akhiyarov\Downloads\TestEngine_Compile ...: d")
In [4]: clr.AddReference("isc.Eng.Hov") Out[4]:
In [5]: import isc.Eng.Hov
In [6]: from isc.Eng.Hov import *
On Mon, Oct 17, 2016 at 8:32 AM, Artem Zhukov
wrote: Denis,
1. from isc.Eng.Hov import * . Result: ImportError: No module named isc.Eng.Hov 2. import HovEngine. Result: ImportError: No module named HovEngine 3. import isc.Eng.Hov.HovEngine. Result: ImportError: No module named isc.Eng.Hov.HovEngine 4. from isc.Eng.Hov.HovEngine import *. Result ImportError: No module named isc.Eng.Hov.HovEngine
I don't know where the mistake could be hidden. As I see from object browser the namespace is HovEngine. [image: unspecified.jpg] Then, what's wrong?
On Mon, Oct 17, 2016 at 2:12 PM Denis Akhiyarov
wrote: Hi Artem,
If clr.FindAssembly("isc.Eng.Hov") and clr.AddReference("isc.Eng.Hov") are working fine, then you need to `import HovEngine`, but not `import isc.Eng.Hov`.
This is assuming isc.Eng.Hov is assembly name, and HovEngine is namespace name.
Thanks, Denis
On Mon, Oct 17, 2016, 12:08 AM Artem Zhukov
wrote: Hello all, please help me to resolve the following problem. I was trying a lot of things (see 1) and still didn't get it. There is also a project on freelancer for that (see 2):
1. http://stackoverflow.com/questions/40037684/adding-reference-to-net-assembly... 2. https://www.freelancer.com/contest/Write-some-Software-867914.html
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
_________________________________________________ Python.NET mailing list - PythonDotNet@python.org https://mail.python.org/mailman/listinfo/pythondotnet
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898 <774%20081%20898>
-- ARTEM ZHUKOV | HVAC/Mech.Engineer | Building Performance Engineer | Sustainability Engineer | HVAC TPM | M: +420 774 081 898
participants (2)
-
Artem Zhukov
-
Denis Akhiyarov