Howdy, Stranger!

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

Supported by

[solved] Problems with complex experiment

edited June 2014 in OpenSesame

I will first say that anyone willing to help me on this is likely a saint. This is not an easy task and I have all but given up on this (and therefore humbly ask for help). I have elected to use mostly python scripting for this project. I have two problems to solve for this project:

  1. The project, in its current state, gives an error message that it never has given before on the line:
    if exp.get("result") == "g0s" and exp.get("bearpos") > 0:

It tells me that there is a syntax error. I am not sure what the problem would be with this

  1. I would like to use pyzmq bindings to be able to communicate data between two computers and get information to use in further steps.

I can answer any questions people have over the project. At this moment I am trying to convince myself to not go back to E-Prime, but if this doesn't work there really isn't a choice.

I have the full experiment uploaded to Google Docs here:

https://drive.google.com/file/d/0ByTs94UTlkOJUnZoS2phRVRnTU0/edit?usp=sharing

I can answer any questions you have. Thank you in advance for any help provided.

Edit:
I am running Ubuntu 14.04 with the latest version of opensesame.

image
(not sure if this helps)

Comments

  • edited May 2014

    Although I haven't looked at your script, I can tell you where the error is likely to come from: a missing bracket somewhere before line 125. Even though it only crashes here, it probably does so because up to that point, the syntax has been interpreted as correct. An example:

    a = 1
    test = (1,2 # <- this is where the actual error is: a missing bracket!
    
    if a == 1: # <- this is where Python thinks the error is, because the code is syntactically correct up to the colon
        print a
    

    Will produce an error like the following, which is exactly the same as yours:

    Traceback (most recent call last):
      File "example.py", line 4
        if a == 1:
                 ^
    SyntaxError: invalid syntax
    

    On your second problem: pyzmq is not bundled together with the standalone version of OpenSesame, but you could add it to the portable version.

    Good luck!

  • edited May 2014

    Hi Edwin,

    I have looked over the code and your suggestion helped me the initial problem. I appreciate your help on that. I was, however wondering if there was an easier way to import information to be used by the experiment. I was wondering if the input function or raw_input would work. I have tried this by importing sys. I keep getting a EOFError. I am not sure how to work on this further. Do I need the portable version and to import a package or something? To be clear I would like to be able to use the debug window to input information to be used in the experiment. Is there a good way to do this?

    I appreciate the help so far. Thank you.

  • edited 7:35AM

    Good to hear you've found the bug in your code.

    There are tons of ways to import stuff into your experiment. The best solution depends on what kind of information you need to add in there. input and raw_input might not prove to be optimal, as OpenSesame takes over the full screen before you could actually type stuff. You could, however, use a (form_)text_input item, or load information from a textfile. Communication between two computers might be easiest through the socket module.

    If you give us a bit more information on what you plan to do, we could give you some pointers.

    Good luck!

  • edited 7:35AM

    This is old and is closed. Thank you

  • edited 7:35AM

    Thanks for the heads-up, we'll mark this as solved!

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