How can I make psychopy display special characters in builder correctly?
224 views
Skip to first unread message
Piotr Faba
unread,
Jul 22, 2015, 9:20:57 AM7/22/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to psychopy-users
Hello,
Setup information: PsychoPy version: 1.82.01, on Windows 7 64-bit Using Builder
Issue: Normally, when one wants to add text in builder, one should use the Text Component and type the text in it. However, the whole thing stops working correctly once I start using characters that are specific for my langauge (Polish). By stopping worrking correctly I mean:
getting a message in the output: "Exception UnicodeDecodeError:"
data files (csv or xlsx) not saving.
the window does not close at the end and I need to use the Stop button to terminate the experiment
The characters that we have in the language that are beyond ASCII's scope are: ąęśćżźńłó and the capitals: ĄĘŚĆŹŻŃŁÓ. To make things even more wierd all these letters can be used in Text Component, but as I found only ó (\u00F3) and Ó (\u00D3) cause the trouble. As I mentioned they display correctly, but they cause problems 1 - 3. Moreover, using ó or Ó anywhere in the Coder Component, even in the comments (after #), causes the same problem.
By inspecting the Coder view I see that ó, for instance, get converted to '\xf3' instead '\u00f3'. All the others are transformed to the '\u....' form.
I am willing to modify my PsychoPy to make this work in Builder, but I do not know where to start. Namely, I do not know how identify function that replaces special chars with the escape strings when the script is being built and why it makes mistake on ó and Ó.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to psychopy-users, michael....@otago.ac.nz
Dear Michael,
Sorry for a late reply. Let me start from the end.
As for your second suggestion, the answer is no. Changing the output settings does not influence the PsychoPy behavoiur in my case. With either .csv or .xlsx exporting, it would not terminate if ó letter appears in CoderComponent or TextComponent.
As for the first suggestion, thank you so much for mentioning it. It seems to have solved the issue for the machine I prepare experiments on.
Many thanks, Piotr
Piotr Faba
unread,
Jul 28, 2015, 8:47:26 AM7/28/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to psychopy-users, michael....@otago.ac.nz, pdf...@gmail.com
For anyone interested in the issue.
To pin down the issue, I prepared as simple experiment as I need to recreate the issue. I attach it for the reference. I found that the problem does not occur, if no loops are present in the psyexp. Hence, without the loops ó character displays and the experiment terminates. With simple loop added, the experiment fails to terminate.
As mentioned above the PsychoPy-1.82.02rc1.zip fixes this issue for me on two computers now (Windows 7 x64 and Windows XP x64).