Menu

#26 unhandled exception in aboutToChange

closed-out-of-date
nobody
Interface (11)
5
2012-10-01
2008-03-03
Anonymous
No

I get an unhandled exception whenever i try to modify an entry in my
LDAP.

----- Backtrace: ----------------------------------------
17:29:17 An unhandled exception occured. This is most likely a bug
in the programming of Luma. In order to fix this, send an email with the
following text and a detailed description of what you were doing to
luma-users@lists.sourceforge.net.
File "/usr/lib/luma/base/utils/gui/BrowserWidget.py", line 148, in
itemClicked
self.emit(PYSIGNAL("about_to_change"), ())
File "/usr/lib/luma/base/utils/gui/AdvancedObjectWidget.py", line 550, in
aboutToChange
0, -1)
Reason: <type 'exceptions.TypeError'> argument 6 of QMessageBox.warning() has
an invalid type
---------------------------------------------------------

I suspect this problem to be related to the version of qt or python-qt
i am using, since luma was working fine on Suse Linux 10.1, but it is
broken since i upgraded to 10.3.

The versions i'm using now are:

$ rpm -q python
python-2.5.1-39.2
$ rpm -q python-ldap
python-ldap-2.3.1-18
$ rpm -q python-qt
python-qt-3.17.3-18
$ rpm -q qt3
qt3-3.3.8-76.2

The problem is present in luma 2.3 as well as in luma 2.4.

Looking a little bit closer into the sources, it seems that
QMessageBox.warning did not like the parameter 'None' in the following
lines of code:

lib/luma/base/utils/gui/AdvancedObjectWidget.py:
|
| result = QMessageBox.warning(None,
| self.trUtf8("Save entry"),
| self.trUtf8("""Do you want to save the entry?"""),
| self.trUtf8("&OK"),
| self.trUtf8("&Cancel"),
| None,
| 0, -1)

So i tried to fix this, replacing 'None' with 'self.trUtf8("")' and
this seems to work. I have to mention that i don't know anything
about Python, neither about Qt programming, so i have no idea if this
will break anything else. But at least, it removes the symptom of the
problem for me. I'll attach a patch with my fix.

Discussion

  • Nobody/Anonymous

    Patch

     
  • Nobody/Anonymous

    Logged In: NO

    I just realized that a similar problem also occurs in the
    usermanagement plugin:

    ----- Backtrace: ----------------------------------------
    11:16:12 An unhandled exception occured. This is most likely a bug
    in the programming of Luma. In order to fix this, send an email with the
    following text and a detailed description of what you were doing to
    luma-users@lists.sourceforge.net.
    File "/usr/lib/luma/base/utils/gui/LumaEntryBrowser.py", line 339, in listItemClicked
    self.emit(PYSIGNAL("about_to_change"), ())
    File "/usr/lib/luma/plugins/usermanagement/UsermanagementWidget.py", line 598, in aboutToChange
    0, -1)
    Reason: <type 'exceptions.TypeError'> argument 6 of QMessageBox.question() has an invalid type
    ---------------------------------------------------------

    lib/luma/plugins/usermanagement/UsermanagementWidget.py:
    | value =QMessageBox.question(None,
    | self.trUtf8("Save entry"),
    | self.trUtf8("""The account has been modified. Do you want to save it?"""),
    | self.trUtf8("&Yes"),
    | self.trUtf8("&No"),
    | None,
    | 0, -1)

    Replacing "None" by "QString.null" will fix the problem.

     
  • Tomas Pospisek

    Tomas Pospisek - 2008-09-15

    same problem here in luma 2.3 and also in luma 2.4. Platform is Ubuntu Heron.

     
  • Tomas Pospisek

    Tomas Pospisek - 2008-09-15

    same problem here in luma 2.3 and also in luma 2.4. Platform is Ubuntu Heron.

     
  • phobie

    phobie - 2012-10-01
    • status: open --> closed-out-of-date
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.