[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Undefined "typeinfo" for KDEDModule while trying to create PtKF5
From: Shaheed Haque <srhaque () theiet ! org>
Date: 2016-04-21 19:18:45
Message-ID: CAHAc2jcp6K95gH=0Dy_Y_mXnGM0PvtcyZDo3ceA-+wuCE2h3Jw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Ah. I see now that when I reported the above, I had also changed/fixed my
paths to make sure I had a PyKF5 directory with a __init__.py, and you are
right, with that plumbing in place, it works without any trouble. For
example:
$ python -c 'from PyKF5 import KDBusAddons'
$ cd PyKF5
$ python -c 'import KDBusAddons'
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: dynamic module not initialized properly
So...I guess this is working as expected!
Thanks, Shaheed
On 21 April 2016 at 18:55, Phil Thompson <phil@riverbankcomputing.com>
wrote:
> On 21 Apr 2016, at 6:48 pm, Shaheed Haque <srhaque@theiet.org> wrote:
> >
> > Phil,
> >
> > That was the problem:
> >
> > $ python
> > ...
> > >>> from PyQt5 import QtCore
> > >>> from PyQt5 import QtDBus
> > >>> from PyKF5 import KDBusAddons
> > >>> help(KDBusAddons)
> > ...etc...
> > >>>
>
> Sorry, I'm confused. Are you saying that the above works?
>
> But doing the KDBusAddons import without the PyQt5 imports doesn't?
>
> > As you suggested, I did some debugging, and the code seems to get right
> to the bottom of sipKDBusAddonscmodule.cpp, such that some printf-debug
> like this :
> >
> > outfile << "at line " << __LINE__ << "\n" <<
> > " QtCore: " << sipModuleAPI_KDBusAddons_QtCore <<
> > " QtDbus: " << sipModuleAPI_KDBusAddons_QtDBus <<
> > " sipModule: " << sipModule << "\n";
> > SIP_MODULE_RETURN(sipModule);
> > }
> >
> > emits *some* values:
> >
> > QtCore: 0x7f0027642c20 QtDbus: 0x7f0027197540 sipModule: 0x7f00307c6e88
> >
> > even in the error case. Is there some way to make the user experience
> more robust in this regard? (I'm going to poke around the PyImport_xxx
> APIs, but I assume there is a reason behind what is done at present?).
>
> Python2 is much worse at reporting import failures than Python3.
>
> Phil
[Attachment #5 (text/html)]
<div dir="ltr"><div><div>Ah. I see now that when I reported the above, I had also \
changed/fixed my paths to make sure I had a PyKF5 directory with a __init__.py, and \
you are right, with that plumbing in place, it works without any trouble. For \
example:<br><br>$ python -c 'from PyKF5 import KDBusAddons'<br>$ cd \
PyKF5<br>$ python -c 'import KDBusAddons'<br>Traceback (most recent call \
last):<br> File "<string>", line 1, in \
<module><br>SystemError: dynamic module not initialized \
properly<br><br></div>So...I guess this is working as expected!<br> \
<br></div>Thanks, Shaheed<br></div><div class="gmail_extra"><br><div \
class="gmail_quote">On 21 April 2016 at 18:55, Phil Thompson <span dir="ltr"><<a \
href="mailto:phil@riverbankcomputing.com" \
target="_blank">phil@riverbankcomputing.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">On 21 Apr 2016, at 6:48 pm, Shaheed Haque \
<<a href="mailto:srhaque@theiet.org">srhaque@theiet.org</a>> wrote:<br> \
><br> > Phil,<br>
><br>
> That was the problem:<br>
><br>
> $ python<br>
> ...<br>
> >>> from PyQt5 import QtCore<br>
> >>> from PyQt5 import QtDBus<br>
> >>> from PyKF5 import KDBusAddons<br>
> >>> help(KDBusAddons)<br>
> ...etc...<br>
> >>><br>
<br>
</span>Sorry, I'm confused. Are you saying that the above works?<br>
<br>
But doing the KDBusAddons import without the PyQt5 imports doesn't?<br>
<span class=""><br>
> As you suggested, I did some debugging, and the code seems to get right to the \
bottom of sipKDBusAddonscmodule.cpp, such that some printf-debug like this :<br> \
><br> > outfile << "at line " << __LINE__ << \
"\n" <<<br> > " QtCore: " << \
sipModuleAPI_KDBusAddons_QtCore <<<br> > " QtDbus: " \
<< sipModuleAPI_KDBusAddons_QtDBus <<<br> > " \
sipModule: " << sipModule << "\n";<br> > \
SIP_MODULE_RETURN(sipModule);<br> > }<br>
><br>
> emits *some* values:<br>
><br>
> QtCore: 0x7f0027642c20 QtDbus: 0x7f0027197540 sipModule: 0x7f00307c6e88<br>
><br>
> even in the error case. Is there some way to make the user experience more \
robust in this regard? (I'm going to poke around the PyImport_xxx APIs, but I \
assume there is a reason behind what is done at present?).<br> <br>
</span>Python2 is much worse at reporting import failures than Python3.<br>
<span class="HOEnZb"><font color="#888888"><br>
Phil</font></span></blockquote></div><br></div>
[Attachment #6 (text/plain)]
_______________________________________________
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