Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-08 Thread Hans-Peter Jansen
On Tuesday 08 February 2011, 01:17:25 Hans-Peter Jansen wrote:
> Dear Phil,
>
> On Monday 07 February 2011, 23:40:41 Phil Thompson wrote:
> >
> > I've now got to the bottom of this. It's a Python bug (#4230) which
> > incorrectly handles __getattr__ when it is a descriptor.
>
> Glad, that you found it - and beg my pardon for this unpleasure
   unpleasant
> experience due to other peoples bugs and silly users using outphased
> distributions... Ohh, well.
>
> > It was fixed in Python v2.5.3 and v2.6.1
>
> For those, that also suffer from this, here's the pointer to both
> fixes:
>
> 2.5:
> http://svn.python.org/view?view=rev&revision=67251
>
> 2.6:
> http://svn.python.org/view?view=rev&revision=67247
>
> For users, still using openSUSE 11.1 out there, I've prepared fixed
> python 2.6.0 packages here:
>
> https://build.opensuse.org/project/monitor?package=&project=home%3Afr
>ispete%3Apython
>
> Hopefully, they're available today morning (CET) here:
>
> http://download.opensuse.org/repositories/home:/frispete:/python/open
>SUSE_11.1/

For the history, applying the referenced patches to Python 2.6.0 fixed 
this issue. 

Pete
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-07 Thread Hans-Peter Jansen
Dear Phil,

On Monday 07 February 2011, 23:40:41 Phil Thompson wrote:
> On Sun, 6 Feb 2011 15:49:59 +0100, "Hans-Peter Jansen"
> 
>
> wrote:
> > On Thursday 03 February 2011, 11:02:32 Phil Thompson wrote:
> >> On Thu, 3 Feb 2011 00:42:05 +0100, "Hans-Peter Jansen"
> >> 
> >>
> >> > Other than that, I'm pretty baffled at the moment. How could I
> >> > debug this issue any further? If I'm going to try bisecting it,
> >> > would you think, that rebuilding sip is sufficient (supposed,
> >> > that 4.12 will not be affected, and hence the issue won't cross
> >> > library version changes)?
> >> >
> >> > Begging-for-ideas-ly-yours,
> >> > Pete
> >>
> >> As your test case is so simple, and that the only bug reports I've
> >> had for either SIP or PyQt are a couple related to pyuic, it
> >> suggests that the problem is the way you are building them.
>
> I've now got to the bottom of this. It's a Python bug (#4230) which
> incorrectly handles __getattr__ when it is a descriptor.

Glad, that you found it - and beg my pardon for this unpleasure 
experience due to other peoples bugs and silly users using outphased 
distributions... Ohh, well.

> It was fixed in Python v2.5.3 and v2.6.1

For those, that also suffer from this, here's the pointer to both fixes:

2.5:
http://svn.python.org/view?view=rev&revision=67251

2.6:
http://svn.python.org/view?view=rev&revision=67247

For users, still using openSUSE 11.1 out there, I've prepared fixed 
python 2.6.0 packages here:

https://build.opensuse.org/project/monitor?package=&project=home%3Afrispete%3Apython

Hopefully, they're available today morning (CET) here:

http://download.opensuse.org/repositories/home:/frispete:/python/openSUSE_11.1/

A short response on this message, if you use these packages, would be 
nice.

Phil - thanks again,
Pete
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-07 Thread Phil Thompson
On Sun, 6 Feb 2011 15:49:59 +0100, "Hans-Peter Jansen" 
wrote:
> On Thursday 03 February 2011, 11:02:32 Phil Thompson wrote:
>> On Thu, 3 Feb 2011 00:42:05 +0100, "Hans-Peter Jansen"
>> 
>>
>> > Other than that, I'm pretty baffled at the moment. How could I
>> > debug this issue any further? If I'm going to try bisecting it,
>> > would you think, that rebuilding sip is sufficient (supposed, that
>> > 4.12 will not be affected, and hence the issue won't cross library
>> > version changes)?
>> >
>> > Begging-for-ideas-ly-yours,
>> > Pete
>>
>> As your test case is so simple, and that the only bug reports I've
>> had for either SIP or PyQt are a couple related to pyuic, it suggests
>> that the problem is the way you are building them.

I've now got to the bottom of this. It's a Python bug (#4230) which
incorrectly handles __getattr__ when it is a descriptor.

It was fixed in Python v2.5.3 and v2.6.1

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-07 Thread Detlev Offenbach
On Sonntag, 6. Februar 2011, Hans-Peter Jansen wrote:
> 
> >   By the way, Detlev, it doesn't look like the 4.4.12 files were
> > published.  I see the folder but no files.  Might be a permission
> > issue, since I am an outsider for the project.
> 
> Sourceforge is still backing up from counter measurements because of
> infrastructure attacks: http://sourceforge.net/blog
> 
> You might need to take the SVN road to a current eric.
> 

I just uploaded the files again.

Detlev
-- 
Detlev Offenbach
det...@die-offenbachs.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-06 Thread Hans-Peter Jansen
Dear Erik,

On Sunday 06 February 2011, 21:08:26 e...@eebrown.com wrote:
> All,
>
>   Thanks for the help.  I had given up on Eric4 this morning and was
> working through some PyQt examples to get a better feel for this
> package.  I've been using SPE (Stani's Python Editor) which is okay
> but was trying to use Eric both for it's name :) and in hopes of
> better autocompletion and help support.
>
>   I applied the fix from your other post, adding a pass to the
> TypeError exception, and it seems to correct the problem.  I've been
> able to open and run python files in eric4 just now without seeing
> the problem.  So in that sense all seems to be well.
>
>   I'm not sure what might be different about my environment.  I am
> running Python 2.5 and backed into the Eric installation.  I started
> with PySide and had this installed, but PySide is a beta and I later
> realized Eric depended on PyQt.  So I uninstalled PySide and looked
> more closely at eric4.  Here is a rough sequence of events that might
> have something to do with all this:
>
>     1. I downloaded the PyQt source (by accident) rather than the
> installer. 2. I hit a problem trying to run this in that Sip was
> missing. 3. So I went out and downloaded Sip (I think it was sip, it
> might have been qscintilla - not sure anymore) 4. This installed
> fine, so now I had Sip available.
> 5. Then Qt was missing and it didn't appear to be in any of the
> folders I had available. 6. So I went and downloaded the full Qt
> installer (which was rather large). 7. I installed Qt with no
> problems, and it appeared to run just fine (at least the demos did).
> 8. Returning to PyQt, I received an error that g++ was not
> accessible.
>
> It was at this point I realized that I had started with the source
> code for PyQt rather than the installer.  I really didn't want to go
> down this road, so...
>
>     9. I downloaded the Windows installer for PyQt.
>     10. Now I was concerned that my versions wouldn't line up
> correctly with what the PyQt installer expected 11. So I uninstalled
> Qt
>     12. I got rid of my PyQt source and other code.
>     13. The I installed PyQt from the installer with no problems.
>     13. At this point I downloaded and installed eric4.
>     14. Then I hit the problem we've been discussing.

I've no idea, how this procedure could be straightened out in order to 
lower the barriers for entering this wonderful environment.

> Early this morning I uninstalled eric4 (v11) and tried putting 4.4.10
> on my machine thinking the prior version might work (makes no sense
> in retrospect, but seemed sensible at the time).  I had the same
> problem, so at that point I gave up.
>
>   With the fix (more of a hack, I agree), I am running eric4 v4.4.10
> with Python 2.5.  I started with 2.5 because the book I had used it
> as well.

Hopefully, the authors name starts with Mark and ends with Summerfield.

> I suspect if I cleared everything out and started over with 
> Python 2.6 or 2.7, it might clear out whatever file issues I may be
> seeing.  I'm reluctant do this as I have a small project I want to
> work on and it's taken me two days to get to the point where I can
> work through the PyQt examples.  So I'll probably stick with this for
> a while until I find a good reason to change.

Going up to Python 2.6 or 2.7 shouldn't present any problems at all. 

Let me get the history straight: the issue, we're facing here is an 
absolute exception. Being involved in PyQt businesses since 10 years, 
this hadn't happen before, and hopefully will not happen again. 

What makes me love that project more than almost any other is its strive 
for deterministic behavior in such a complex environment (Python, Qt, 
multi platform), that cannot be fully deterministic by definition 
(since development time IS limited, and time is behaving nearly 
linearly on OUR usual space-time continuum). 

I try to help Phil to resolve this ASAP. 

>   By the way, Detlev, it doesn't look like the 4.4.12 files were
> published.  I see the folder but no files.  Might be a permission
> issue, since I am an outsider for the project.

Sourceforge is still backing up from counter measurements because of 
infrastructure attacks: http://sourceforge.net/blog

You might need to take the SVN road to a current eric.

Pete

>   If there is a specific file or system setting you'd like to see or
> know of, just let me know.
>
> Thanks again for the assistance,
>
> Erik
>
>   Original Message 
>  Subject: Re: [PyQt] BUG: sip instance attribute error: Re: [eric4]
>  python qscintilla traceback with current snapshot also
>  From: Detlev Offenbach 
>  Date: Sun, Feb

Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-06 Thread Hans-Peter Jansen
On Sunday 06 February 2011, 16:40:41 Phil Thompson wrote:
> On Sun, 6 Feb 2011 15:49:59 +0100, "Hans-Peter Jansen"
> 
>
> wrote:
> >
> > # derive from a sip wrapped class
> > class C(QtCore.QObject):
> > def __init__(self):
> > super(C, self).__init__()
> > # access a non existing attribute results in:
> > # TypeError: 'sip.methoddescriptor' object is not callable
> > try:
> > print self.c, type(self.c)
> > except AttributeError:
> > pass
> >
> > c = C()
> >
> >
> > results in
> >
> > Traceback (most recent call last):
> >   File "sipinstance-v2.py", line 38, in 
> > c = C()
> >   File "sipinstance-v2.py", line 34, in __init__
> > print self.c, type(self.c)
> > TypeError: 'sip.methoddescriptor' object is not callable
> >
> > Instancing QApplication or not doesn't seem to matter here, though.
> >
> > Given, that at least another report for win32 exists, this issue is
> > may be more involved, than it appears on the surface.
> >
> > Pete
>
> It will be related to the new support for __getattr__ in QObject.
>
> You could look at qpycore_qobject_getattr.cpp and see what it is
> returning in the failing case - it should raise the AttributeError
> and return 0.

Hmm, found it. It searches the Qt meta system for matching methods, and 
raises the AttributeError if that fails. The behavior seems to stem 
from the fact that it finds the offending 'sip.methoddescriptor' for 
some reason, and falls flat on its face when trying to call it... 

But more importantly, does that mean, that you can reproduce it now?

Pete
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-06 Thread Phil Thompson
On Sun, 6 Feb 2011 15:49:59 +0100, "Hans-Peter Jansen" 
wrote:
> On Thursday 03 February 2011, 11:02:32 Phil Thompson wrote:
>> On Thu, 3 Feb 2011 00:42:05 +0100, "Hans-Peter Jansen"
>> 
>>
>> > Other than that, I'm pretty baffled at the moment. How could I
>> > debug this issue any further? If I'm going to try bisecting it,
>> > would you think, that rebuilding sip is sufficient (supposed, that
>> > 4.12 will not be affected, and hence the issue won't cross library
>> > version changes)?
>> >
>> > Begging-for-ideas-ly-yours,
>> > Pete
>>
>> As your test case is so simple, and that the only bug reports I've
>> had for either SIP or PyQt are a couple related to pyuic, it suggests
>> that the problem is the way you are building them.
> 
> The build system is fully documented (OBS, you remember), and didn't 
> changed since month. I don't play any really dirty games there. Two  
> patches are applied (inherited from openSUSE builds, where they're used 
> since ages): 
>  * disable RPATH 
>  * disable timestamping sip generated files
> 
> The former is not needed and the latter is used by the build system to 
> detect real changes to built packages: if they don't differ, they're 
> quashed (in order to avoid too much churn, aka build storms). You might 
> remember, that I asked you for a global persistent flag in sip to 
> disable it generally: that would spare us the second patch.
> 
> Since the OBS creates a defined build environment that only contains the

> defined build dependencies every time a package is build, this reduces 
> the risk of misdirected side effects during build significantly. 
> 
> Using a package manager for the resulting packages eliminates the usual 
> caveats of having stray builds lying around, dependency issues, and the 
> like. All in all, it's a pretty robust "production grade" setup, that 
> is also used to produce full distributions.
> 
> 
> Back to the issue. Still no bisection, but a few more data points:
>  * it doesn't appear for basic Qt types like QDate
>  * it's not related to QScintilla
> 
> 
> from PyQt4 import QtCore, QtGui
> 
> class A(object):
> def __init__(self):
> # catch access a non existing attribute
> try:
> print self.a, type(self.a)
> except AttributeError:
> pass
> 
> a = A()
> 
> # derive from a sip wrapped class
> class B(QtCore.QDate):
> def __init__(self):
> super(B, self).__init__()
> try:
> print self.b, type(self.b)
> except AttributeError:
> pass
> 
> b = B()
> 
> #app = QtGui.QApplication([])
> 
> # derive from a sip wrapped class
> class C(QtCore.QObject):
> def __init__(self):
> super(C, self).__init__()
> # access a non existing attribute results in:
> # TypeError: 'sip.methoddescriptor' object is not callable
> try:
> print self.c, type(self.c)
> except AttributeError:
> pass
> 
> c = C()
> 
> 
> results in
> 
> Traceback (most recent call last):
>   File "sipinstance-v2.py", line 38, in 
> c = C()
>   File "sipinstance-v2.py", line 34, in __init__
> print self.c, type(self.c)
> TypeError: 'sip.methoddescriptor' object is not callable
> 
> Instancing QApplication or not doesn't seem to matter here, though.
> 
> Given, that at least another report for win32 exists, this issue is may 
> be more involved, than it appears on the surface.
> 
> Pete

It will be related to the new support for __getattr__ in QObject.

You could look at qpycore_qobject_getattr.cpp and see what it is returning
in the failing case - it should raise the AttributeError and return 0.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-06 Thread Detlev Offenbach
On Sonntag, 6. Februar 2011, Hans-Peter Jansen wrote:
> On Sunday 06 February 2011, 15:49:19 Detlev Offenbach wrote:
> > On Sonntag, 6. Februar 2011, Hans-Peter Jansen wrote:
> > > Dear Erik,
> > > 
> > > On Sunday 06 February 2011, 05:19:54 e...@eebrown.com wrote:
> > > > Mr. Jansen,
> > > > 
> > > >   I noticed your messages on this subject, and wonder if you
> > > > 
> > > > found a resolution to this problem?
> > > 
> > > I was able to track the issue down to this, and this message
> > > contains a temporary workaround to eric:
> > > 
> > > http://www.riverbankcomputing.com/pipermail/pyqt/2011-February/0291
> > >
> > >63.html
> > >
> > > Hopefully, you're able to apply the diff, it's around line 1261.
> > > With it, you're able to use eric again.
> > 
> > The latest eric4 release (as of today) does contain this "fix".
> 
> Detlev, I beg to differ. While I understand your intention, this will only
> cover a much deeper fundamental problem, that appears to bite people
> rarely. But if it bites, it's a real PITA, hence I vote for quickly
> removing it again, soon.
> 
> I stumbled across another package at least, that suffers from it, but
> spreading such mishaps just contributes to the "voodoo programming"
> pattern, that I can't stand..
> 
> Much more important, did it happened for you, too?

No!

Detlev
-- 
Detlev Offenbach
det...@die-offenbachs.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-06 Thread Hans-Peter Jansen
On Sunday 06 February 2011, 15:49:19 Detlev Offenbach wrote:
> On Sonntag, 6. Februar 2011, Hans-Peter Jansen wrote:
> > Dear Erik,
> >
> > On Sunday 06 February 2011, 05:19:54 e...@eebrown.com wrote:
> > > Mr. Jansen,
> > >
> > >   I noticed your messages on this subject, and wonder if you
> > > found a resolution to this problem?
> >
> > I was able to track the issue down to this, and this message
> > contains a temporary workaround to eric:
> >
> > http://www.riverbankcomputing.com/pipermail/pyqt/2011-February/0291
> >63.html
> >
> > Hopefully, you're able to apply the diff, it's around line 1261.
> > With it, you're able to use eric again.
>
> The latest eric4 release (as of today) does contain this "fix".

Detlev, I beg to differ. While I understand your intention, this will only 
cover a much deeper fundamental problem, that appears to bite people rarely. 
But if it bites, it's a real PITA, hence I vote for quickly removing it again, 
soon. 

I stumbled across another package at least, that suffers from it, but spreading 
such mishaps just contributes to the "voodoo programming" pattern, that I can't 
stand..

Much more important, did it happened for you, too?

Pete___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-06 Thread Hans-Peter Jansen
On Thursday 03 February 2011, 11:02:32 Phil Thompson wrote:
> On Thu, 3 Feb 2011 00:42:05 +0100, "Hans-Peter Jansen"
> 
>
> > Other than that, I'm pretty baffled at the moment. How could I
> > debug this issue any further? If I'm going to try bisecting it,
> > would you think, that rebuilding sip is sufficient (supposed, that
> > 4.12 will not be affected, and hence the issue won't cross library
> > version changes)?
> >
> > Begging-for-ideas-ly-yours,
> > Pete
>
> As your test case is so simple, and that the only bug reports I've
> had for either SIP or PyQt are a couple related to pyuic, it suggests
> that the problem is the way you are building them.

The build system is fully documented (OBS, you remember), and didn't 
changed since month. I don't play any really dirty games there. Two  
patches are applied (inherited from openSUSE builds, where they're used 
since ages): 
 * disable RPATH 
 * disable timestamping sip generated files

The former is not needed and the latter is used by the build system to 
detect real changes to built packages: if they don't differ, they're 
quashed (in order to avoid too much churn, aka build storms). You might 
remember, that I asked you for a global persistent flag in sip to 
disable it generally: that would spare us the second patch.

Since the OBS creates a defined build environment that only contains the 
defined build dependencies every time a package is build, this reduces 
the risk of misdirected side effects during build significantly. 

Using a package manager for the resulting packages eliminates the usual 
caveats of having stray builds lying around, dependency issues, and the 
like. All in all, it's a pretty robust "production grade" setup, that 
is also used to produce full distributions.


Back to the issue. Still no bisection, but a few more data points:
 * it doesn't appear for basic Qt types like QDate
 * it's not related to QScintilla


from PyQt4 import QtCore, QtGui

class A(object):
def __init__(self):
# catch access a non existing attribute
try:
print self.a, type(self.a)
except AttributeError:
pass

a = A()

# derive from a sip wrapped class
class B(QtCore.QDate):
def __init__(self):
super(B, self).__init__()
try:
print self.b, type(self.b)
except AttributeError:
pass

b = B()

#app = QtGui.QApplication([])

# derive from a sip wrapped class
class C(QtCore.QObject):
def __init__(self):
super(C, self).__init__()
# access a non existing attribute results in:
# TypeError: 'sip.methoddescriptor' object is not callable
try:
print self.c, type(self.c)
except AttributeError:
pass

c = C()


results in

Traceback (most recent call last):
  File "sipinstance-v2.py", line 38, in 
c = C()
  File "sipinstance-v2.py", line 34, in __init__
print self.c, type(self.c)
TypeError: 'sip.methoddescriptor' object is not callable

Instancing QApplication or not doesn't seem to matter here, though.

Given, that at least another report for win32 exists, this issue is may 
be more involved, than it appears on the surface.

Pete
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-06 Thread Detlev Offenbach
On Sonntag, 6. Februar 2011, Hans-Peter Jansen wrote:
> Dear Erik,
> 
> On Sunday 06 February 2011, 05:19:54 e...@eebrown.com wrote:
> > Mr. Jansen,
> > 
> >   I noticed your messages on this subject, and wonder if you found a
> > resolution to this problem? 
> 
> I was able to track the issue down to this, and this message contains a
> temporary workaround to eric:
> 
> http://www.riverbankcomputing.com/pipermail/pyqt/2011-February/029163.html
> 
> Hopefully, you're able to apply the diff, it's around line 1261. With
> it, you're able to use eric again.
> 

The latest eric4 release (as of today) does contain this "fix".

Detlev
-- 
Detlev Offenbach
det...@die-offenbachs.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-06 Thread Hans-Peter Jansen
Dear Erik,

On Sunday 06 February 2011, 05:19:54 e...@eebrown.com wrote:
> Mr. Jansen,
>
>   I noticed your messages on this subject, and wonder if you found a
> resolution to this problem?  

I was able to track the issue down to this, and this message contains a 
temporary workaround to eric:

http://www.riverbankcomputing.com/pipermail/pyqt/2011-February/029163.html

Hopefully, you're able to apply the diff, it's around line 1261. With 
it, you're able to use eric again.

OTOH, I'm too busy at the moment to investigate for a real fix to the 
issue. Interestingly, you're on win32. Could you document your 
environment a bit more, e.g. OS version, where do your packages 
Python, Qt, sip, and PyQt stem from, or how do you built them yourself 
(including logs, if possible). That would be really helpful to narrow 
down the circumstances, where this issue appears..

> I am somewhat new to python and have 
> been using IDLE.  Figured I should up my game and start using an IDE
> and settled on using Eric4.  I was able to get everything installed
> from the downloadable installation files but am hitting the same
> problem you appear to be seeing.  Whenever I try to open a file or
> create a new file, I get the error 'sip.methoddescriptor' object is
> not callable.  Oddly enough, the other problem I see is that I can't
> resize the Eric4 window horizontally (up and down works fine). 
> Wouldn't expect this to be related, but in the interest of full
> disclosure.

No it's not, and this sounds strange. You may want to play with the PyQt  
examples a bit to check for other deficits.

>   If it helps, below is the gory details of what I'm seeing, which
> traces down to the same line you point to in your note.  I am using
> Python 2.5 and thought perhaps I would upgrade to 2.6 in an attempt
> to fix this.  However, since you are using 2.6 I thought I would
> check in with you first.  Perhaps I should fall back to Eric4 v4.4.10
> instead.

No, this won't fix your issue, since it is something related to sip, or 
rather the way, that sip is built. 

Pete

> Thank you for any assistance,
>
> Erik Brown
> Virginia, USA
>
> ==
> Warning:
> An unhandled exception occurred. Please report the problem
> using the error reporting dialog or via email to
> . A log has been written to
> "C:\[deleted]\_eric4\eric4_error.log". Error information:
> -
>--- 2011-02-05, 23:13:42
> -
>--- :
> 'sip.methoddescriptor' object is not callable
> -
>--- File "c:\program files\python
> 2.5\Lib\site-packages\eric4\ViewManager\ViewManager.py", line 2906,
> in openFiles self.openSourceFile(prog)
> File "c:\program files\python
> 2.5\Lib\site-packages\eric4\ViewManager\ViewManager.py", line 3068,
> in openSourceFile newWin, editor = self.getEditor(fn, filetype =
> filetype)
> File "c:\program files\python
> 2.5\Lib\site-packages\eric4\ViewManager\ViewManager.py", line 3287,
> in getEditor tv = e4App().getObject("TaskViewer"))
> File "c:\program files\python
> 2.5\Lib\site-packages\eric4\QScintilla\Editor.py", line 233, in
> __init__ self.__setEolMode()
> File "c:\program files\python
> 2.5\Lib\site-packages\eric4\QScintilla\Editor.py", line 3370, in
> __setEolMode self.__eolChanged()
> File "c:\program files\python
> 2.5\Lib\site-packages\eric4\QScintilla\Editor.py", line 1267, in
> __eolChanged self.__checkEol()
> File "c:\program files\python
> 2.5\Lib\site-packages\eric4\QScintilla\Editor.py", line 1259, in
> __checkEol
> self.supportedEols[self.getLineSeparator()].setChecked(True)
> -
>--- Version Numbers:
> Python 2.5.1
> Qt 4.7.1
> PyQt4 4.8.3
> sip 4.12.1
> QScintilla 2.4.6
> eric4 4.4.11 (r3912)
> Platform: win32
> 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
> -
>--- Plugins Version Numbers:
> PluginAbout 4.4.0
> PluginEricapi 4.4.0
> PluginEricdoc 4.4.0
> PluginSyntaxChecker 4.4.0
> PluginTabnanny 4.4.0
> PluginVcsPySvn 4.4.0
> PluginVcsSubversion 4.4.0
> PluginVmListspace 4.4.0
> PluginVmMdiArea 4.4.0
> PluginVmTabview 4.4.0
> PluginVmWorkspace 4.4.0
> PluginWizardPyRegExp 4.4.0
> PluginWizardQColorDialog 4.4.0
> PluginWizardQFileDialog 4.4.0
> PluginWizardQFontDialog 4.4.0
> PluginWizardQInputDialog 4.4.0
> PluginWizardQMessageBox 4.4.0
> PluginWizardQRegExp 4.4.0


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-03 Thread Hans-Peter Jansen
[Oops, missing recipients..]

On Wednesday 02 February 2011, 23:12:07 Phil Thompson wrote:
> On Wed, 2 Feb 2011 22:59:27 +0100, "Hans-Peter Jansen"
> 
> >
> > Could you do me a flavor and call
> > python -v sipinstance.py (attached again) for your 2.6 setup.
>
> Attached.

Thanks, but nothing stands out.

Well, the issue survived the reboot, hence it is stable, reproducible, 
and is definitely related to sip (but not in all settings, obviously). 

Checking the build logs uncovered a warning, I never noticed before:

gcc -c -pipe -march=i586 -mtune=i686  -fmessage-length=0 -O2 -Wall 
-D_FORTIFY_SOURCE=2 
-fstack-protector  -funwind-tables -fasynchronous-unwind-tables -g -O2 -w 
-DNDEBUG -I. -o  parser.o parser.c
/home/phil/hg/sip/sip-4.12.1/sipgen/parser.c: In function 'yyparse':
/home/phil/hg/sip/sip-4.12.1/sipgen/parser.y:3070: note: 'sname' was  declared 
here

but since you supply the parser.c, any adverse effects would have bitten 
you, too.

My last resort are compiler options, but even imaging a compiler switch, 
that is able to change the code behavior in such fundamental ways sounds 
pretty unlikely. Given, that the rest of sip seems to do fine only adds 
to the fact of being pretty esoteric. Anyway, my gcc is 4.3.3.

I already send you the warnings that the automatic python code check
generated that you related to the unfixable python interface. When 
looking over the list, it seems to have grown some WARNINGs and 
(must fix!) attributions, that might be worth looking into again:

/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:4449: 
'PyUnicode_DecodeASCII' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:4459: 
'PyUnicode_DecodeASCII' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:4467: 
'PyUnicode_DecodeLatin1' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:4477: 
'PyUnicode_DecodeLatin1' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:4488: 
'PyUnicode_DecodeUTF8' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:4502: 
'PyUnicode_DecodeUTF8' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:4535: 
'PyUnicode_FromWideChar' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:4545: 
'PyUnicode_FromWideChar' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:11194: 
'PyUnicode_DecodeASCII' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:11204: 
'PyUnicode_DecodeASCII' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:11213: 
'PyUnicode_DecodeLatin1' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:11223: 
'PyUnicode_DecodeLatin1' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:11235: 
'PyUnicode_DecodeUTF8' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:11250: 
'PyUnicode_DecodeUTF8' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:11282: 
'PyUnicode_FromWideChar' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/sipgen/gencode.c:11292: 
'PyUnicode_FromWideChar' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/siplib/descriptors.c:94: 
'PyType_GenericAlloc' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/siplib/descriptors.c:218: 
'PyType_GenericAlloc' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/siplib/threads.c:107: 'PyTuple_New' uses 
Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/siplib/voidptr.c:127: 'PyInt_FromSsize_t' 
uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/siplib/voidptr.c:144:  'PyInt_AsSsize_t' 
uses Py_ssize_t for return values (may need overflow  check)
/usr/src/packages/BUILD/sip-4.12.1/siplib/voidptr.c:432: WARNING:  
'PySlice_GetIndicesEx' uses Py_ssize_t for output parameters (must fix!)
/usr/src/packages/BUILD/sip-4.12.1/siplib/voidptr.c:489: WARNING:  
'PySlice_GetIndicesEx' uses Py_ssize_t for output parameters (must fix!)
/usr/src/packages/BUILD/sip-4.12.1/siplib/voidptr.c:647: WARNING: 
'getcharbufferproc' must be replaced with 'charbufferproc'
/usr/src/packages/BUILD/sip-4.12.1/siplib/siplib.c:131: 'inquiry' should be 
perhaps replaced with 'lenfunc'
/usr/src/packages/BUILD/sip-4.12.1/siplib/siplib.c:1741: 'PyTuple_New' uses 
Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/siplib/siplib.c:1790: 'PyTuple_New' uses 
Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/siplib/siplib.c:1861: 
'PyUnicode_FromWideChar' uses Py_ssize_t for input parameters
/usr/src/packages/BUILD/sip-4.12.1/siplib/siplib.c:1895: 
'PyString_FromStringAndSize' uses Py

Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-02 Thread Hans-Peter Jansen
On Wednesday 02 February 2011, 22:29:48 Phil Thompson wrote:
> On Wed, 2 Feb 2011 22:25:09 +0100, "Hans-Peter Jansen"
> 
>
> wrote:
> > On Wednesday 02 February 2011, 22:16:46 Phil Thompson wrote:
> >> On Wed, 2 Feb 2011 21:33:39 +0100, "Hans-Peter Jansen"
> >> 
> >>
> >> wrote:
> >> > [Oops, sorry, send too fast]
> >> >
> >> > Dear Phil,
> >> >
> >> > On Tuesday 01 February 2011, 22:26:43 Hans-Peter Jansen wrote:
> >> >> Phil, something is badly broken with the current release and
> >> >> the snapshots.
> >> >
> >> > Here's the essence of the issue:
> >> >
> >> > class A(object):
> >> > def __init__(self):
> >> > # catch access a non existing attribute
> >> > try:
> >> > print self.a, type(self.a)
> >> > except AttributeError:
> >> > pass
> >> >
> >> > a = A()
> >> >
> >> > from PyQt4.Qsci import QsciScintilla
> >> >
> >> > # derive from a sip wrapped class
> >> > class B(QsciScintilla):
> >> > def __init__(self):
> >> > # access a non existing attribute results in:
> >> > # TypeError: 'sip.methoddescriptor' object is not
> >> > callable try:
> >> > print self.b, type(self.b)
> >> > except AttributeError:
> >> > pass
> >> >
> >> > b = B()
> >> >
> >> > results in:
> >> >
> >> > Traceback (most recent call last):
> >> >   File "sipinstance.py", line 22, in 
> >> > b = B()
> >> >   File "sipinstance.py", line 18, in __init__
> >> > print self.b, type(self.b)
> >> > TypeError: 'sip.methoddescriptor' object is not callable
> >> >
> >> > Obviously, accessing non existing attributes in classes wrapped
> >> > by sip causes havoc (an unexpected TypeError).
> >> >
> >> > At least for:
> >> > python: 2.6
> >> > sip: 4.12.1
> >> > qt4: 4.6.3
> >> > pyqt4: snapshot-4.8.4-278054fd857c
> >> >
> >> >
> >> > I was able to fix eric with this diff:
> >> >
> >> > --- QScintilla/Editor.py~   2011-02-02 21:31:20.741149390
> >> > +0100 +++ QScintilla/Editor.py2011-02-02
> >> > 21:31:30.683988621 +0100 @@ -1258,7 +1258,7 @@ class
> >> > Editor(QsciScintillaCompat): """
> >> >  try:
> >>
> >> self.supportedEols[self.getLineSeparator()].setChecked(True)
> >>
> >> > -except AttributeError:
> >> > +except (AttributeError, TypeError):
> >> >  pass
> >> >
> >> >  def __eolChanged(self):
> >> >
> >> > Note: self.supportedEols doesn't exist, when this method is
> >> > called the first
> >> > time.
> >> >
> >> > Guess, it's sip 4.12.2 time ;-)
> >> >
> >> > Pete
> >>
> >> If I run the code as above I get a "RuntimeError: underlying
> >> C/C++..." as expected. Adding the missing call to
> >> QsciScintilla.__init__() (and creating a QApplication at the
> >> start) then it runs fine (ie. an AttributeError is raised).
> >
> > You mean:
> >
> > class A(object):
> > def __init__(self):
> > # catch access a non existing attribute
> > try:
> > print self.a, type(self.a)
> > except AttributeError:
> > pass
> >
> > a = A()
> >
> > from PyQt4 import QtGui
> > from PyQt4.Qsci import QsciScintilla
> >
> > app = QtGui.QApplication([])
> >
> > # derive from a sip wrapped class
> > class B(QsciScintilla):
> > def __init__(self):
> > super(B, self).__init__()
> > # access a non existing attribute results in:
> > # TypeError: 'sip.methoddescriptor' object is not callable
> > try:
> > print self.b, type(self.b)
> > except AttributeError:
> > pass
> >
> > b = B()
> >
> >
> > but still:
> >
> > Traceback (most recent call last):
> >   File "sipinstance.py", line 28, in 
> > b = B()
> >   File "sipinstance.py", line 24, in __init__
> > print self.b, type(self.b)
> > TypeError: 'sip.methoddescriptor' object is not callable
> >
> > It might be a Python version issue? (where I'm on 2.6, and you?)
>
> I've tried it with 2.6, 2.7 and 3.2rc2 - works fine.

I'm baffled, what TF is going here. 

Meanwhile, I relocated sitecustomize.py (just in case), and stopped all 
python instances, checked ldconfig, and what not.

Could you do me a flavor and call
python -v sipinstance.py (attached again) for your 2.6 setup.

Here's mine:

> python -v sipinstance.py
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.6/site.pyc matches /usr/lib/python2.6/site.py
import site # precompiled from /usr/lib/python2.6/site.pyc
# /usr/lib/python2.6/os.pyc matches /usr/lib/python2.6/os.py
import os # precompiled from /usr/lib/python2.6/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib/python2.6/posixpath.pyc matches /usr/lib/python2.6/posixpath.py
import posixpath # precompiled from /usr/lib/python2.6/posixpath.pyc
# /usr/lib/python2.6/stat.pyc matches /usr/lib/python2.6/stat.py
import stat # precompiled from /usr/lib/python2.6/stat.pyc
# /usr/lib/python2.6/genericpath.pyc matches /usr/lib/python2.6/genericpath.py
import genericpath # preco

Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-02 Thread Phil Thompson
On Wed, 2 Feb 2011 22:25:09 +0100, "Hans-Peter Jansen" 
wrote:
> On Wednesday 02 February 2011, 22:16:46 Phil Thompson wrote:
>> On Wed, 2 Feb 2011 21:33:39 +0100, "Hans-Peter Jansen"
>> 
>>
>> wrote:
>> > [Oops, sorry, send too fast]
>> >
>> > Dear Phil,
>> >
>> > On Tuesday 01 February 2011, 22:26:43 Hans-Peter Jansen wrote:
>> >> Phil, something is badly broken with the current release and the
>> >> snapshots.
>> >
>> > Here's the essence of the issue:
>> >
>> > class A(object):
>> > def __init__(self):
>> > # catch access a non existing attribute
>> > try:
>> > print self.a, type(self.a)
>> > except AttributeError:
>> > pass
>> >
>> > a = A()
>> >
>> > from PyQt4.Qsci import QsciScintilla
>> >
>> > # derive from a sip wrapped class
>> > class B(QsciScintilla):
>> > def __init__(self):
>> > # access a non existing attribute results in:
>> > # TypeError: 'sip.methoddescriptor' object is not callable
>> > try:
>> > print self.b, type(self.b)
>> > except AttributeError:
>> > pass
>> >
>> > b = B()
>> >
>> > results in:
>> >
>> > Traceback (most recent call last):
>> >   File "sipinstance.py", line 22, in 
>> > b = B()
>> >   File "sipinstance.py", line 18, in __init__
>> > print self.b, type(self.b)
>> > TypeError: 'sip.methoddescriptor' object is not callable
>> >
>> > Obviously, accessing non existing attributes in classes wrapped by
>> > sip causes havoc (an unexpected TypeError).
>> >
>> > At least for:
>> > python: 2.6
>> > sip: 4.12.1
>> > qt4: 4.6.3
>> > pyqt4: snapshot-4.8.4-278054fd857c
>> >
>> >
>> > I was able to fix eric with this diff:
>> >
>> > --- QScintilla/Editor.py~   2011-02-02 21:31:20.741149390 +0100
>> > +++ QScintilla/Editor.py2011-02-02 21:31:30.683988621 +0100
>> > @@ -1258,7 +1258,7 @@ class Editor(QsciScintillaCompat):
>> >  """
>> >  try:
>>
>> self.supportedEols[self.getLineSeparator()].setChecked(True)
>>
>> > -except AttributeError:
>> > +except (AttributeError, TypeError):
>> >  pass
>> >
>> >  def __eolChanged(self):
>> >
>> > Note: self.supportedEols doesn't exist, when this method is called
>> > the first
>> > time.
>> >
>> > Guess, it's sip 4.12.2 time ;-)
>> >
>> > Pete
>>
>> If I run the code as above I get a "RuntimeError: underlying
>> C/C++..." as expected. Adding the missing call to
>> QsciScintilla.__init__() (and creating a QApplication at the start)
>> then it runs fine (ie. an AttributeError is raised).
> 
> You mean:
> 
> class A(object):
> def __init__(self):
> # catch access a non existing attribute
> try:
> print self.a, type(self.a)
> except AttributeError:
> pass
> 
> a = A()
> 
> from PyQt4 import QtGui
> from PyQt4.Qsci import QsciScintilla
> 
> app = QtGui.QApplication([])
> 
> # derive from a sip wrapped class
> class B(QsciScintilla):
> def __init__(self):
> super(B, self).__init__()
> # access a non existing attribute results in:
> # TypeError: 'sip.methoddescriptor' object is not callable
> try:
> print self.b, type(self.b)
> except AttributeError:
> pass
> 
> b = B()
> 
> 
> but still: 
> 
> Traceback (most recent call last):
>   File "sipinstance.py", line 28, in 
> b = B()
>   File "sipinstance.py", line 24, in __init__
> print self.b, type(self.b)
> TypeError: 'sip.methoddescriptor' object is not callable
> 
> It might be a Python version issue? (where I'm on 2.6, and you?)

I've tried it with 2.6, 2.7 and 3.2rc2 - works fine.

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-02 Thread Hans-Peter Jansen
On Wednesday 02 February 2011, 22:16:46 Phil Thompson wrote:
> On Wed, 2 Feb 2011 21:33:39 +0100, "Hans-Peter Jansen"
> 
>
> wrote:
> > [Oops, sorry, send too fast]
> >
> > Dear Phil,
> >
> > On Tuesday 01 February 2011, 22:26:43 Hans-Peter Jansen wrote:
> >> Phil, something is badly broken with the current release and the
> >> snapshots.
> >
> > Here's the essence of the issue:
> >
> > class A(object):
> > def __init__(self):
> > # catch access a non existing attribute
> > try:
> > print self.a, type(self.a)
> > except AttributeError:
> > pass
> >
> > a = A()
> >
> > from PyQt4.Qsci import QsciScintilla
> >
> > # derive from a sip wrapped class
> > class B(QsciScintilla):
> > def __init__(self):
> > # access a non existing attribute results in:
> > # TypeError: 'sip.methoddescriptor' object is not callable
> > try:
> > print self.b, type(self.b)
> > except AttributeError:
> > pass
> >
> > b = B()
> >
> > results in:
> >
> > Traceback (most recent call last):
> >   File "sipinstance.py", line 22, in 
> > b = B()
> >   File "sipinstance.py", line 18, in __init__
> > print self.b, type(self.b)
> > TypeError: 'sip.methoddescriptor' object is not callable
> >
> > Obviously, accessing non existing attributes in classes wrapped by
> > sip causes havoc (an unexpected TypeError).
> >
> > At least for:
> > python: 2.6
> > sip: 4.12.1
> > qt4: 4.6.3
> > pyqt4: snapshot-4.8.4-278054fd857c
> >
> >
> > I was able to fix eric with this diff:
> >
> > --- QScintilla/Editor.py~   2011-02-02 21:31:20.741149390 +0100
> > +++ QScintilla/Editor.py2011-02-02 21:31:30.683988621 +0100
> > @@ -1258,7 +1258,7 @@ class Editor(QsciScintillaCompat):
> >  """
> >  try:
>
> self.supportedEols[self.getLineSeparator()].setChecked(True)
>
> > -except AttributeError:
> > +except (AttributeError, TypeError):
> >  pass
> >
> >  def __eolChanged(self):
> >
> > Note: self.supportedEols doesn't exist, when this method is called
> > the first
> > time.
> >
> > Guess, it's sip 4.12.2 time ;-)
> >
> > Pete
>
> If I run the code as above I get a "RuntimeError: underlying
> C/C++..." as expected. Adding the missing call to
> QsciScintilla.__init__() (and creating a QApplication at the start)
> then it runs fine (ie. an AttributeError is raised).

You mean:

class A(object):
def __init__(self):
# catch access a non existing attribute
try:
print self.a, type(self.a)
except AttributeError:
pass

a = A()

from PyQt4 import QtGui
from PyQt4.Qsci import QsciScintilla

app = QtGui.QApplication([])

# derive from a sip wrapped class
class B(QsciScintilla):
def __init__(self):
super(B, self).__init__()
# access a non existing attribute results in:
# TypeError: 'sip.methoddescriptor' object is not callable
try:
print self.b, type(self.b)
except AttributeError:
pass

b = B()


but still: 

Traceback (most recent call last):
  File "sipinstance.py", line 28, in 
b = B()
  File "sipinstance.py", line 24, in __init__
print self.b, type(self.b)
TypeError: 'sip.methoddescriptor' object is not callable

It might be a Python version issue? (where I'm on 2.6, and you?)

Pete
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] BUG: sip instance attribute error: Re: [eric4] python qscintilla traceback with current snapshot also

2011-02-02 Thread Phil Thompson
On Wed, 2 Feb 2011 21:33:39 +0100, "Hans-Peter Jansen" 
wrote:
> [Oops, sorry, send too fast]
> 
> Dear Phil,
> 
> On Tuesday 01 February 2011, 22:26:43 Hans-Peter Jansen wrote:
>>
>> Phil, something is badly broken with the current release and the
>> snapshots. 
> 
> Here's the essence of the issue:
> 
> class A(object):
> def __init__(self):
> # catch access a non existing attribute
> try:
> print self.a, type(self.a)
> except AttributeError:
> pass
> 
> a = A()
> 
> from PyQt4.Qsci import QsciScintilla
> 
> # derive from a sip wrapped class
> class B(QsciScintilla):
> def __init__(self):
> # access a non existing attribute results in:
> # TypeError: 'sip.methoddescriptor' object is not callable
> try:
> print self.b, type(self.b)
> except AttributeError:
> pass
> 
> b = B()
> 
> results in:
> 
> Traceback (most recent call last):
>   File "sipinstance.py", line 22, in 
> b = B()
>   File "sipinstance.py", line 18, in __init__
> print self.b, type(self.b)
> TypeError: 'sip.methoddescriptor' object is not callable
> 
> Obviously, accessing non existing attributes in classes wrapped by sip
> causes havoc (an unexpected TypeError).
> 
> At least for:
> python: 2.6
> sip: 4.12.1
> qt4: 4.6.3
> pyqt4: snapshot-4.8.4-278054fd857c
> 
> 
> I was able to fix eric with this diff:
> 
> --- QScintilla/Editor.py~   2011-02-02 21:31:20.741149390 +0100
> +++ QScintilla/Editor.py2011-02-02 21:31:30.683988621 +0100
> @@ -1258,7 +1258,7 @@ class Editor(QsciScintillaCompat):
>  """
>  try:
> 
self.supportedEols[self.getLineSeparator()].setChecked(True)
> -except AttributeError:
> +except (AttributeError, TypeError):
>  pass
>  
>  def __eolChanged(self):
> 
> Note: self.supportedEols doesn't exist, when this method is called the
> first
> time.
> 
> Guess, it's sip 4.12.2 time ;-)
> 
> Pete

If I run the code as above I get a "RuntimeError: underlying C/C++..." as
expected. Adding the missing call to QsciScintilla.__init__() (and creating
a QApplication at the start) then it runs fine (ie. an AttributeError is
raised).

Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt