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
Comments
Hi Kiri,
Yes, the utf-8 can be a bit problematic. Basically, the program assumes by default that your text is ASCII encoded, even if the text itself was coded in utf-8. In order to prevent OpenSesame from getting confused, you want to add something like "stimulus = stimulus.decode('utf-8')", before you call the stimulus variable in a canvas.text command.
Hope this helps!
Cheers,
Josh
Hi Kiri,
In general, Josh is right that it's best to use
unicode
strings if your text contains special characters. If you decodestr
tounicode
as soon as possible (e.g. directly after reading from a file) you usually avoid any encoding/ decoding trouble (which is troublesome in Python 2).However, this general guideline doesn't appear to be directly related to your problem. It seems that your text is actually numeric, that is, an
int
object. Possibly, this results from OpenSesame's 'smart typing', as described here:Could you post the full traceback from the debug window + a more detailed description of your experiment + your version of OpenSesame and operating system?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Josh and sebastiaan,
thank you for the quick answers. Tomorrow I will have the possibility to test your solutions and post the debug window as well as the versions of OpenSesame. The operating system is Windows 7.
In the experiment, some sentences will be presented in russian. To know which sentence is which one, they got integer codes in other cells of the csv file within the line. At first, the lines are read, then partet into the cells. During this progress, I printed the content into the debug window. Everything works fine there, and is presented as it should be.
But in Run-Phase, when I design the rows by the title-line, as soon as the first sentence should be presented the error message appears.
The version of OpenSesame is 2.9.x (current).
I tested it so far.
The first message of the debug window is:
Decoding the fields of the csv-file right after reading it didn't change this error message.
So what's in the inline script? Around line 68 you appear to be decoding the
int
.Check out SigmundAI.eu for our OpenSesame AI assistant!
That's exactly the problem. Within the experiment, neither in Prepare nor in Run-Phase are integers declared in line 68. They are decoded in Prepare around line 60.
Here the actual decoding code (from line 52 on):
The error message says that
decode()
is being called on anint
object. Python is usually not wrong about these things, so the question is where thisint
comes from. I would start by adding proper debugprint
statements, for example, like so:This way you can walk through all rows and fields to see if there's an
int
in there. Then, once you know that's the case (or not), you can go back to whererow
is created, and see what's going on.Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thank you very much, Sebastiaan.
It seems that one of the condition-coding rows can't be decoded. Yet, another row with similar input (integers, too) doesn't provoke any errors.
Here's the new error-message:
How do I change the type of the row into another variable-type? I already tried to change it into string by using
str()
(asstr(row[field])
among others) but this didn't work. Codec of the csv-file still says "UTF-8 w/o BOM".The file is read by the code as follows:
I think the easiest solution for you is to use the
UnicodeReader
, which is a recipe described on the Python docs:You can add this snippet in a
init
script at the beginning of the experiment:Then you can read the csv file as before, except using
UnicodeReader
instead ofcsv.DictReader
. Like so:Make sure you don't mix
unicode
andstr
! In other words, useu'unicode strings'
instead of'str strings'
when typing string literals in your code.Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thank you. I tested it but maybe I understood something wrong...
I filled in the code above (imports and class definitions) and afterwards let the script read the file as follows:
But now the script seems to declare
string
to every field of the csv-file. Therefore, I get the following error message:Error while executing inline script
phase: prepare
item: exp
line: 85
exception message: list indices must be integers, not unicode
exception type: TypeError
Traceback (also in debug window):
File "dist\libopensesame\inline_script.py", line 133, in prepare
File "", line 85, in
TypeError: list indices must be integers, not unicode
Neither in line 133 of prepare (where one of the conditions is assigned to a number for the trigger-function) nor in line 85 (which is the line right after printing the fields within the above code) seems to be a plausible reason for this error-message.
Within debug-window, the code is not printed out as letters, but as a row of character codes. (I think this is because of the print command using
u'
, but deleting it or replacing it withstr()
doesn't work.)Might there be a way to assign
integer
to specific fields of the csv-file?