Howdy, Stranger!

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

Supported by

[open] Opensesame 3.0 bugs

edited October 2015 in OpenSesame

Hi all

We have just (today) had opensesame added to the open access PC's for use in some tutorials, unfortunately I was hoping for version 2.9.7 but didn't realise that you have changed at the weekend. I had given them a link to the main download page. Now the tutorials aren't able to run, unless I can debug them which I am struggling with due to the following problems.

I am running using the zipped version, as I dont want to install it yet.

If I use a canvas without importing it I get the red arrow (undefined name 'canvas')
If I use canvas witout (exp) I get the following TypeError: canvas() takes at least 1 argument (0 given)

If I make a mistake in a inline script, i.e. defining a variable as global after it has been set e.g. a = 10 global a,then
an error message appears (Oops, I did it again) and I am unable to get back into the inline script, have to go through the Script editor.

Will let you know if I find other issues.

Regards

Gary

Comments

  • edited 6:07AM

    Using the var feature gives me an error message undefined 'var'

  • edited 6:07AM

    Hi Gary,

    Thanks for your feedback.

    If I use a canvas without importing it I get the red arrow (undefined name 'canvas') If I use canvas witout (exp) I get the following TypeError: canvas() takes at least 1 argument (0 given.

    You see the red arrow if 'Validate content' is enabled in the editor component. This is because it validates the scripts by themselves, and does not take into account that you can use symbols from one script in another. This option is disabled by default, exactly to avoid these false alarm.

    In any case, you can safely ignore it. (And validation can even be convenient to catch real errors if you can see past the false alarms.)

    So: no need to import canvas, and no need to pass exp--just as it says in the docs.

    If I make a mistake in a inline script, i.e. defining a variable as global after it has been set e.g. a = 10 global a,then an error message appears (Oops, I did it again) and I am unable to get back into the inline script, have to go through the Script editor.

    Is saw that coming in, yes. This happens when there is a SyntaxWarning, which is triggered very rarely--I wasn't even aware that they existed. So far, the only situation I know of is what you describe: declaring a variable global after assigning to it.

    I actually uploaded a 3.0.1 prerelease where this is fixed, because it is extremely annoying, if rare:

    By the way, you don't need to declare symbols global in most cases:

    Using the var feature gives me an error message undefined 'var'

    What do you mean with 'using the var feature'? var is an object that you can access in inline_script items. After running an experiment, you can access a var object (kind of a shadow of the real one) also from the debug window.

    Cheers,
    Sebastiaan

  • edited 6:07AM

    Hi

    I was trying to update the code with all the new features/methods, in an attempt to debug the code. The main problem turned out to be programmer error, used == in the Run if, but this appears to work in 2.9.x. Would it be possible to have both recognised, programmers want to use == and others =.

    But I did try the following:

    No import of canvas and no need to pass exp.
    Change self.get and exp.set to var.
    And to try to remove all the error indicators, using global etc

    The error with the canvas was caused by importing canvas and not passing exp, it is ok if not imported with or without exp.

    I was slightly under pressure and was trying to work through the errors, so all these red arrows was confusing the matter.

    Regards
    Gary

  • edited 6:07AM

    The main problem turned out to be programmer error, used == in the Run if, but this appears to work in 2.9.x. Would it be possible to have both recognised, programmers want to use == and others =.

    You can use '=' and '==' interchangeably in conditional statements. (Not if you use Python code, of course.) Can you give an example of a conditional statement that doesn't work as expected?

    The error with the canvas was caused by importing canvas and not passing exp, it is ok if not imported with or without exp.

    Yes, I suspected as much. If you do from openexp.canvas import canvas, you overwrite, or shadow, the new canvas function with the old one, so you have pass exp again. So these two scripts are interchangeable (although the second is clearly nicer):

    # The old way
    from openexp.canvas import canvas
    c = canvas(exp)
    

    and

    # OpenSesame >= 3.0.0
    c = canvas()
    
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