[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] RuntimeError: the sip module has already registered
From:       Peter Kessen <P.Kessen () Kalverkamp ! de>
Date:       2019-10-17 3:56:47
Message-ID: b173c46e-dffa-447a-8405-ba0bfd040ec9 () kalverkamp ! de
[Download RAW message or body]

Hello,

Did anyone have an idea on this?

________________________________
From: Peter Kessen
Sent: Wednesday, 2 October 2019 15:54
To: pyqt@riverbankcomputing.com
Subject: RuntimeError: the sip module has already registered

Hi All,

I=92m trying to use pyqt5 for a user interface inside of an extension for S=
iemens 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:
RuntimeError: the sip module has already registered a module called PyQt5.Q=
tCore
The Traceback points to the line where the import of the PyQt5 modules are =
done.

Is there any way to unregister all modules for sip before importing PyQt5?

Kind regards

Peter Kessen

[Attachment #3 (text/html)]

<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">&nbsp;</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">&nbsp;</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">&nbsp;</span></p> <p class="MsoNormal"><span style="">Kind \
regards</span></p> <p class="MsoNormal"><span style="">&nbsp;</span></p>
<p class="MsoNormal"><span style="">Peter Kessen</span></p>
</div>
</div>
</body>
</html>


[Attachment #4 (unknown)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic