<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Lucida Sans";
        panose-1:2 11 6 2 3 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.gmail-m-6574483508385625401gmailmsg
        {mso-style-name:gmail-m_-6574483508385625401gmail_msg;}
p.gmail-m-6574483508385625401gmailmsg1, li.gmail-m-6574483508385625401gmailmsg1, div.gmail-m-6574483508385625401gmailmsg1
        {mso-style-name:gmail-m_-6574483508385625401gmail_msg1;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.E-MailFormatvorlage20
        {mso-style-type:personal-reply;
        font-family:"Lucida Sans","sans-serif";
        color:black;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">Hi Denis,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">Thanks for answer.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">The third-party DLL I just link with early binding (including the reference in MS Visual Studio project).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">Kresimir.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="DE" style="font-family:"Arial","sans-serif";color:black"><br>
<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="DE" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span lang="DE" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> PythonDotNet [mailto:pythondotnet-bounces+kresimir.simunic=reicofil.com@python.org]
<b>Im Auftrag von </b>Denis Akhiyarov<br>
<b>Gesendet:</b> Donnerstag, 8. Dezember 2016 14:11<br>
<b>An:</b> A list for users and developers of Python for .NET<br>
<b>Betreff:</b> Re: [Python.NET] Exception at PythhonEngine.Initialize()<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p>Hi Kresimir,<o:p></o:p></p>
<p><o:p> </o:p></p>
<p>I experienced a similar issue with pythonnet on the CPython side (import clr), but these could be unrelated.<o:p></o:p></p>
<p><a href="https://github.com/pythonnet/pythonnet/issues/242">https://github.com/pythonnet/pythonnet/issues/242</a><o:p></o:p></p>
<p><br>
How are you loading the third-party DLL? Did you check assembly binding log viewer for any errors?<o:p></o:p></p>
<p>We can't help much, if you cannot provide a reproducible code with all dependencies.<o:p></o:p></p>
<p><o:p> </o:p></p>
<p>Thanks,<o:p></o:p></p>
<p>Denis<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, Dec 8, 2016, 6:21 AM Simunic,Kresimir <<a href="mailto:Kresimir.Simunic@reicofil.com" target="_blank">Kresimir.Simunic@reicofil.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">Hi all,</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"> </span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">I use one third-party DLL (.NET) and after loading
 this DLL and then calling PythonEngine.Initialize() following exception will be thrown:</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"> </span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">12/8/2016 1:05:34 PM: System.Reflection.ReflectionTypeLoadException
</span></span><span class="gmail-m-6574483508385625401gmailmsg"><b><span style="font-size:11.5pt;font-family:"Arial","sans-serif";color:#242729">Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information</span></b></span><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">  
</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">bei System.Reflection.RuntimeModule.GetTypes(RuntimeModule
 module)</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">   bei System.Reflection.Assembly.GetTypes()</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">   bei Python.Runtime.AssemblyManager.ScanAssembly(Assembly
 assembly)</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">   bei Python.Runtime.AssemblyManager.Initialize()</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">   bei Python.Runtime.Runtime.Initialize()</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">   bei Python.Runtime.PythonEngine.Initialize()</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"> </span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">If I first call PythonEngine.Initialize() and
 then call this third-party DLL, everything is fine.</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"> </span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">The producer of this third-party DLL tells me
 the problem is not with them but with Python DLL.</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"> </span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">Can somebody help me ?</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"> </span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">Thanks.</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"> </span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">Regards,</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black"> </span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif";color:black">Kresimir.</span></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span class="gmail-m-6574483508385625401gmailmsg"><span lang="DE"> </span></span><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="gmail-m-6574483508385625401gmailmsg1"><b><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif"">Reifenhäuser Reicofil GmbH & Co. KG</span></b><span style="font-size:10.0pt;font-family:"Lucida Sans","sans-serif""><br>
Spicher Straße 46, 53844 Troisdorf, Germany<br>
Registergericht Siegburg, Reg.Nr. HR A 4534<br>
USt-IdNr. DE 814359351, Steuer-Nr. 5220/5760/0426<br>
Reifenhäuser Reicofil Verwaltungs-GmbH<br>
Registergericht Siegburg, Reg.Nr. HR B 788<br>
Geschäftsführer: Dr.-Ing. Bernd Kunze<br>
<br>
Please note: This message may contain information which is privileged, confidential and proprietary.
</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">_________________________________________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org" target="_blank">
PythonDotNet@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pythondotnet" target="_blank">https://mail.python.org/mailman/listinfo/pythondotnet</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>