Howdy, Stranger!

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

Supported by

Bug with "full-factorial design" button

edited October 2016 in OpenSesame

Hi everyone,

After some efforts, I've managed to make OpenSesame 3 work on Xubuntu 16.04. Actually, after having installed it via this site's repository, I had to manually install some dependencies that hadn't been automatically installed (python-expyriment and some Qscintilla libraries).

Nonetheless, I still experience a bug while using the "full-factorial design" window. The issue is as follows: the first time I use it, everything works fine. But the data I put in it stick there even if I change experiment; and when I try to right-click elements to delete them, an unexpected error occurs. Here I paste the relevant infos from the error message:

_Operating System: linux2
OpenSesame: 3.1.2b1
Python: 2.7.12

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/qdatamatrix/_qspreadsheet.py", line 108, in contextMenuEvent
    QContextMenu(self).exec_(e.globalPos())
  File "/usr/lib/python2.7/dist-packages/qdatamatrix/_qcontextmenu.py", line 111, in __init__
    self.addAction(QCutAction(self))
  File "/usr/lib/python2.7/dist-packages/qdatamatrix/_qcontextmenu.py", line 60, in __init__
    QContextAction.__init__(self, u'edit-cut', _(u'Cut'), menu, u'Ctrl+X')
  File "/usr/lib/python2.7/dist-packages/qdatamatrix/translate.py", line 29, in _
    encoding=QCoreApplication.UnicodeUTF8)
**AttributeError: **type object 'QCoreApplication' has no attribute 'UnicodeUTF8'_

Comments

  • PS: Markdown syntax just messed up everything. For the error message, please refer to this pastebin: http://pastebin.com/xe9djEtF

  • Update: I've found a workaround to run it w/o bugs, just by removing "QCoreApplication.UnicodeUTF8" from line 29 (see Traceback above).

    Also, the program runs into error also when I try to add files to the file pool. (Traceback here: http://pastebin.com/D2UmJU6H). I've also worked around this by commenting lines 85-114 and 167-168 in fileinspector.py (see this 2nd traceback for further details).

    I can't exclude I will found other problems. I think there's some serious conflict going on in my system.
    I have also tested OpenSesame on Xubuntu 14.04 and it works just fine without any hacks.

    Any suggestions?

  • Hi,

    Thanks for pointing out these issues. It seems to be a mix of actual bugs and particularities of your system. So, if I understand correctly, there are two things here:

    1. The UnicodeUTF8 issue in qdatamatrix.
    2. The magic issue in fileinspector.

    Right?

    Cheers.
    Sebastiaan

  • Thank you for your quick response.
    Yes, that's right.

  • I'm a bit puzzled by the UnicodeUTF8 issue. Could you run the following in the debug window and post the output here? (Pro tip: You can copy the script to the clipboard, and then enter %paste in the debug window.)

    import sys
    from qtpy import QtCore
    print('Python: %s' % sys.version)
    print('QtCoreApplication.UnicodeUTF8: %s' % hasattr(QtCore.QCoreApplication, 'UnicodeUTF8'))
    print('__version__: %s' % QtCore.__version__)
    print('PYQT_VERSION_STR: %s' % QtCore.PYQT_VERSION_STR)
    print('__file__: %s' % QtCore.__file__)
    
  • edited October 2016

    ERROR: Line magic function %paste not found.

    And here is the output after manually copypasting:
    Python: 2.7.12 (default, Jul 1 2016, 15:12:24)
    [GCC 5.4.0 20160609]
    QtCoreApplication.UnicodeUTF8: False
    version: 5.5.1
    PYQT_VERSION_STR: 5.5.1
    file: /usr/lib/python2.7/dist-packages/qtpy/QtCore.pyc

    PS: I have also found this on Qt wiki. Don't know if it's related (I'm a bit rookie on Qt as well as on Python).

  • Right, I see now. You're running Python 2 and PyQt5, which is unusual (usually it's Python 3 and PyQt5, or Python 2 and PyQt4) and until recently wasn't even possible. It's a good thing though, because PyQt5 is definitely smoother than PyQt4.

    @Daniel actually already fixed this bug in python-qdatamatrix 0.1.9. You can download it from GitHub, pypi, or through the opensesame-james ppa:

    The fileinspector issue will be resolved shortly.

    Cheers!

  • edited October 2016

    Ok, now the loop table & the full-factorial design wizard work. However, it seems odd to me that, when I open the wizard within another loop, old variables are still present in the wizard's table. Is it the expected behavior?

    Anyway, I do have Python3 installed. If this would solve the issues, is there a way to force OpenSesame to use it instead of the system-default Python2?

  • However, it seems odd to me that, when I open the wizard within another loops, old variables are still present in the wizard's table. Is it the expected behavior?

    Yes!

    Anyway, I do have Python3 installed. If this would solve the issues, is there a way to force OpenSesame to use it instead of the system-default Python2?

    Not easily, no. But the issues are resolved now, right?

  • Not easily, no. But the issues are resolved now, right?

    The Unicode one is; the magic one isn't yet.

  • edited October 2016

    Also, slightly unrelated and just for the sake of debugging: as I mentioned in the opening post, after having installed OpenSesame via the smathot/cogscinl PPA repository, I had to manually install the packages python-pyqt5.qsci and python-expyriment in order to make OpenSesame work.

    (1) Without python-pyqt5.qsci, OpenSesame doesn't even open. If started via console, it gives the following error:

    Traceback (most recent call last): File "/usr/bin/opensesame", line 25, in <module> __main__.opensesame() File "/usr/lib/python2.7/dist-packages/libqtopensesame/__main__.py", line 105, in opensesame opensesame.resume_init() File "/usr/lib/python2.7/dist-packages/libqtopensesame/qtopensesame.py", line 105, in resume_init from QProgEdit import validate File "/usr/lib/python2.7/dist-packages/QProgEdit/__init__.py", line 69, in <module> from QProgEdit._quiloader import QUiLoader File "/usr/lib/python2.7/dist-packages/QProgEdit/_quiloader.py", line 23, in <module> from QProgEdit.pyqt5compat import uic File "/usr/lib/python2.7/dist-packages/QProgEdit/pyqt5compat.py", line 22, in <module> from PyQt5 import Qsci ImportError: cannot import name Qsci

    I suppose this is related to the unexpected use of Python2 along with Qt5.

    (2) Without python-expyriment, the program works but can't use Expyriment as backend. I think apt-get tried (unsuccessfully) to retrieve the package expyriment instead.

    Edit: I manually tried to launch sudo apt-get install expyriment, and this is the output:
    The following packages have unmet dependencies: expyriment : Depends: python-support (>= 0.90.0) but it is not installable Recommends: python-parallel (>= 0.2) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

  • the magic one isn't yet.

    python-fileinspector 1.0.2, which includes the fix, should be in the opensesame-james ppa now. (So the testing ppa, not the stable cogscinl ppa.)

  • edited October 2016

    python-fileinspector 1.0.2, which includes the fix, should be in the opensesame-james ppa now. (So the testing ppa, not the stable cogscinl ppa.)

    Great! Now it works.

    There's just this issue in icon visualization, but I honestly don't care, as long as the software is fully usable... so, don't bother debugging this just for me ;)

Sign In or Register to comment.