我有一个名为participants
的mysql数据库,其中有一个名为turkdemo
的表... database_url
字符串和table_name
字符串设置为适当的“http://:@ 127.0.0.1:3306 / participant”和“turkdemo”。
我将启动mysql服务器:
sudo /etc/init.d/mysql start
打开psiTurk,启动服务器,然后调试:
psiturk
server on
debug
接下来,shell输出它正在启动一个浏览器窗口......它确实显示了
“内部服务器错误 服务器遇到内部错误,无法完成您的请求。服务器过载或应用程序出错。“
server.log的最后一行:(这是full log entry)
OperationalError: (OperationalError) (1054, "Unknown column 'turkdemo.uniqueid' in 'field list'") 'SELECT count(*) AS count_1 \nFROM (SELECT turkdemo.uniqueid AS turkdemo_uniqueid, turkdemo.assignmentid AS turkdemo_assignmentid, turkdemo.workerid AS turkdemo_workerid, turkdemo.hitid AS turkdemo_hitid, turkdemo.ipaddress AS turkdemo_ipaddress, turkdemo.browser AS turkdemo_browser, turkdemo.platform AS turkdemo_platform, turkdemo.language AS turkdemo_language, turkdemo.cond AS turkdemo_cond, turkdemo.counterbalance AS turkdemo_counterbalance, turkdemo.codeversion AS turkdemo_codeversion, turkdemo.beginhit AS turkdemo_beginhit, turkdemo.beginexp AS turkdemo_beginexp, turkdemo.endhit AS turkdemo_endhit, turkdemo.bonus AS turkdemo_bonus, turkdemo.status AS turkdemo_status, turkdemo.datastring AS turkdemo_datastring \nFROM turkdemo \nWHERE turkdemo.assignmentid != %s AND turkdemo.workerid = %s) AS anon_1' (u'debug8TBWSM', u'debugJ4DKWD')
我不确定这里发生了什么。查看错误,似乎tabledemo
表中缺少字段。我假设psiTurk会自行完成所有正确的SELECT和INSERT操作。
答案 0 :(得分:1)
如果tabledemo表中缺少字段,则它将失败,因为架构未正确对齐。您只需从SQL数据库中删除“tabledemo”,它就会在您第一次在该实验文件夹中运行psiturk时使用正确的模式自动重新创建它。