Howdy, Stranger!

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

Supported by

[solved] Can´t open my newly created experiments (failed to open file)

edited February 2015 in OpenSesame

Hey everyone, it seems like i need some help again - not with actual experiment programming this time though:

I just wrote two experiments - both worked fine until i closed everything and wanted to open them again :(

opensesame comes up with this message when trying to open one of the files:
(no idea why the following is a wall of text -.- looks fine in edit and preview windows ... sigh)

Failed to open file
line: 47
exception message: arguments did not match any overloaded call: QTableWidget(QWidget parent=None): argument 1 has unexpected type 'unicode' QTableWidget(int, int, QWidget parent=None): argument 1 has unexpected type 'unicode'
exception type: TypeError

Traceback (also in debug window):
  File "dist\libqtopensesame\qtopensesame.py", line 671, in open_file
  File "dist\libqtopensesame\items\experiment.py", line 77, in __init__
  File "dist\libopensesame\experiment.py", line 205, in __init__
  File "dist\libopensesame\item.py", line 79, in __init__
  File "dist\libopensesame\experiment.py", line 324, in from_string
  File "dist\libqtopensesame\misc\qtitem_store.py", line 78, in new
  File "dist\libopensesame\item_store.py", line 90, in new
  File "dist\libqtopensesame\items\loop.py", line 52, in __init__
  File "dist\libqtopensesame\items\qtitem.py", line 50, in __init__
  File "dist\libqtopensesame\items\loop.py", line 487, in init_edit_widget
  File "dist\libqtopensesame\widgets\loop_table.py", line 55, in __init__
  File "dist\libqtopensesame\widgets\good_looking_table.py", line 47, in __init__
TypeError: arguments did not match any overloaded call:
  QTableWidget(QWidget parent=None): argument 1 has unexpected type 'unicode'
  QTableWidget(int, int, QWidget parent=None): argument 1 has unexpected type 'unicode'

I checked the scriptfile in the tar.gz file: line47 is

set maxchar "50"

from a define text_display block... guess thats not the line47 opensesame points out...

Just created a new, empty, experiment, saved it and was able to open it... no idea why it won´t open the above two...

Edit: Some system specs: Windows 7 x64, experiments were created with os 2.9.2, tried to open with 2.9.4 aswell

Comments

  • edited 8:52AM

    Could you upload the experiment somewhere? For example FileDropper.

  • edited 8:52AM

    Hey sebastiaan,

    of course! silly enough i didnt think of that myself :)
    http://www.filedropper.com/srcr2opensesametar

  • edited 8:52AM

    Hi,

    Ok, you ran into a little bug (just filed it as #309). What causes the problem is that you have set the cycles variable of loop to a non-integer value:

    define loop loop
        set cycles "[blockCounter]"
    

    The GUI chokes on this, although it shouldn't. To fix this, you can extract the experiment with a tool like 7-Zip, open script.opensesame in a text editor, and edit the offending line, for example by changing it to set cycles 1. After that, you should be able to open the experiment again.

    Cheers!
    Sebastiaan

  • edited 8:52AM

    Oh wow - yes it works :)
    I will use the break if condition as a workaround as long as the gui doesnt like that :)
    Also, happy to make you find a new bug :-bd

    And of course: Thanks for your quick replies! Having problems with opensesame is almost as not having problems with opensesame ;)

  • edited 8:52AM

    Hi,
    i am also having a problem re-opening my script.
    I followed the tips presented in this thread and edited it but maybe I am still missing out something.
    I uploaded my exp here
    http://www.filedropper.com/simontaskopensesametar
    (ps: it is a small exp for a tutorial, which makes everything sound even more embarassing).
    Any help would be super appreciated. Thanks
    Harold

  • edited 8:52AM

    Hey harold,

    upon trying to open your experiment opensesame states that the file is not a gzip file.
    Did you use 7-Zip to do your editing in the script?
    If i recall right i edited the script directly in 7-ZIP (it still has to open the file in an editor, but i did NOT manually extract everything and then put it back together). I think it was something like right-click the script file within 7-ZIP and "edit" or something like that :)

  • edited 8:52AM

    Hi Harold,

    I'm not sure what happened here (it might be due to filedropper), but the format of the file is a tar archive (.tar), whereas OpenSesame expect a gzipped tar archive (.tar.gz). So what you could do is rename the file to something.tar, and open it in a program like 7-zip to extract the script.

    Cheers,
    Sebastiaan

Sign In or Register to comment.