Unicode Encode Error

19 views
Skip to first unread message

Anna Hu

unread,
Sep 27, 2021, 12:38:13 PM9/27/21
to PsiTurk
Hi,

I'm running an experiment on heroku and pulling the data using psiturk. However, halfway through data collection, my psiturk started returning the error "EXCEPTION of type 'UnicodeEncodeError' occurred with message: ''ascii' codec can't encode character 'u2019' in position 29038: ordinal not in range(128)" when I use "download_datafiles."

I'm pretty certain this error arises from some type of participant input as I was able to use "download_datafiles" successfully on 2 batches of participants before it stopped working on the next batch, and I hadn't modified any code in between.

Does anyone know how I can fix this error? I want to pull the latest data from my experiment but am not able to do so because of this.

Also, not sure if this is a relevant detail, but I run psiturk on a Windows machine through a linux Docker container. 

Thanks!

Dave Eargle

unread,
Oct 4, 2021, 12:24:34 PM10/4/21
to Anna Hu, PsiTurk
Hmm. You could try the "programmatic" approach here, modifying it as necessary: https://psiturk.readthedocs.io/en/latest/retrieving.html

Or you could use some combination of heroku psql commands. Here's an example of copying a csv file into a psql table -- you'd change "\copy table_name FROM..." to "\copy table_name TO..."

--
You received this message because you are subscribed to the Google Groups "PsiTurk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psiturk+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psiturk/8acd32e3-9f0c-402b-b812-c778a467a0f9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages