<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
a:link, span.MsoHyperlink
{color:#0563C1;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:#954F72;
text-decoration:underline}
span.E-MailFormatvorlage17
{font-family:"Calibri",sans-serif;
color:windowtext}
.MsoChpDefault
{font-family:"Calibri",sans-serif}
@page WordSection1
{margin:70.85pt 70.85pt 2.0cm 70.85pt}
div.WordSection1
{}
-->
</style>
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12.0pt; line-height:1.3; color:#1F497D">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif}
a:link, span.MsoHyperlink
{color:#0563C1;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:#954F72;
text-decoration:underline}
span.E-MailFormatvorlage17
{font-family:"Calibri",sans-serif;
color:windowtext}
.MsoChpDefault
{font-family:"Calibri",sans-serif}
@page WordSection1
{margin:70.85pt 70.85pt 2.0cm 70.85pt}
-->
</style>
<div>Hello, <br>
<br>
Did anyone have an idea on this? <br>
</div>
<br>
</div>
<hr style="border:none; height:1px; color:#E1E1E1; background-color:#E1E1E1">
<div style="border:none; padding:3.0pt 0cm 0cm 0cm"><span style="font-size:11.0pt; font-family:Calibri,Arial,Helvetica,sans-serif"><b>From:</b> Peter Kessen<br>
<b>Sent:</b> Wednesday, 2 October 2019 15:54<br>
<b>To:</b> pyqt@riverbankcomputing.com<br>
<b>Subject:</b> RuntimeError: the sip module has already registered<br>
</span></div>
<br type="attribution">
<div>
<div class="WordSection1">
<p class="MsoNormal">Hi All,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span lang="EN-US">I’m trying to use pyqt5 for a user interface inside of an extension for Siemens NX 12. When I execute my code for the first time after the launch of nx there are no errors. But when I execute it for a second time I get
the error message:</span></p>
<p class="MsoNormal"><span lang="EN-US">RuntimeError: the sip module has already registered a module called PyQt5.QtCore</span></p>
<p class="MsoNormal"><span lang="EN-US">The Traceback points to the line where the import of the PyQt5 modules are done.</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span lang="EN-US">Is there any way to unregister all modules for sip before importing PyQt5?</span></p>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="">Kind regards</span></p>
<p class="MsoNormal"><span style=""> </span></p>
<p class="MsoNormal"><span style="">Peter Kessen</span></p>
</div>
</div>
</body>
</html>