Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Extension get_started misbehaved on event startup (see debug window for stack trace)

edited February 2017 in OpenSesame

Opensesame 3.1.6, Arch linux

    Extension error

    item-stack: 
    exception message: fromTheme() takes no keyword arguments
    time: Wed Feb  8 15:59:14 2017
    exception type: TypeError

    Traceback:
      File "/usr/lib/python2.7/site-packages/libqtopensesame/extensions/_extension_manager.py", line 133, in fire
        ext.fire(event, **kwdict)
      File "/usr/lib/python2.7/site-packages/libqtopensesame/extensions/_base_extension.py", line 386, in fire
        getattr(self, u'event_%s' % event)(**kwdict)
      File "/usr/share/opensesame_extensions/get_started/get_started.py", line 108, in event_startup
        self.main_window.open_file(path=path)
      File "/usr/lib/python2.7/site-packages/libqtopensesame/qtopensesame.py", line 760, in open_file
        self.ui.pool_widget.refresh()
      File "/usr/lib/python2.7/site-packages/libqtopensesame/widgets/pool_widget.py", line 184, in refresh
        icon = self.theme.qfileicon(self.pool[path])
      File "/usr/lib/python2.7/site-packages/libqtopensesame/misc/theme.py", line 123, in qfileicon
        fallback=QtGui.QIcon.fromTheme(fallback))
    TypeError: fromTheme() takes no keyword arguments

I've just notice that this leads to variable inspector not showing and pool shown as empty. Clicking on variable inspector button does nothing, but clicking on pool button gives the following.

    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/libqtopensesame/qtopensesame.py", line 618, in toggle_pool
        self.ui.pool_widget.refresh()
      File "/usr/lib/python2.7/site-packages/libqtopensesame/widgets/pool_widget.py", line 184, in refresh
        icon = self.theme.qfileicon(self.pool[path])
      File "/usr/lib/python2.7/site-packages/libqtopensesame/misc/theme.py", line 123, in qfileicon
        fallback=QtGui.QIcon.fromTheme(fallback))
    TypeError: fromTheme() takes no keyword arguments

Looks like something with the theme and Qt libs?

Hike

Comments

  • Hi Hike,

    You're using an incompatible version of PyQt—probably a very old version of PyQt4, because fromTheme() has accepted the fallback keyword for ages. I would check your package manager to see which version you're using, and upgrade if possible; or install PyQt5 (in which case you'll probably have to install several PyQt5 packages, but you'll find that out along the way).

    Cheers!
    Sebastiaan

    Buy Me A Coffee

  • edited February 2017

    I've got python-pyqt4 4.12-4 installed as well as python2-pyqt5 5.7.1-3 , which are the latest on https://riverbankcomputing.com/software/pyqt/download

    Arch linux is a rolling disto, so it usually has the latest (more or less stable) packages.

  • What do you see if you run the following lines in a Python interpreter (make sure it's the same Python as used by OpenSesame):

    import qtpy
    import os
    print(os.environ['QT_API'])
    

    This will print out the Qt Python library that is used. There are three possibilities: pyqt (= PyQt4), pyqt5, and pyside. The first two should work; the last one is untested.

    Buy Me A Coffee

  • It gives me pyqt5 both in OpenSesame and in python interpreter. Both use Python 2.7.13, which is the latest.

    Thanks for looking into this!

  • Sebastiaan, do you think AnyQt ( https://pypi.python.org/pypi/AnyQt/0.0.6 ) might be helpful here?
    I'm using Orange ( http://orange.biolab.si/ ), and they recently implemented this to fight the PyQt4 vs PyQt5 issue.

  • edited March 2017

    @Daniel just sent a pull request (520) to fix this issue, so it should be resolved in 3.1.7.

    Sebastiaan, do you think AnyQt ( https://pypi.python.org/pypi/AnyQt/0.0.6 ) might be helpful here?

    OpenSesame uses something similar, called qtpy, to provide compatibility with both PyQt4 and PyQt5. But these compatibility layers essentially just remap the way you import PyQt modules. They don't change the APIs at the level of keywords and arguments, which is the problem here. I suspect that they PyQt developers accidentally changed this.

    Buy Me A Coffee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games