audiolabs / webMUSHRA

a MUSHRA compliant web audio API based experiment software

Home Page:https://audiolabs.github.io/webMUSHRA/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error occurs when writing results to csv

npuichigo opened this issue · comments

PHP Warning: Invalid argument supplied for foreach() in webMUSHRA/service/write.php

Undefined index: sessionJSON

which config were you using? which php version?

Same issue on customized config. What do I need to check to solve the problem?

hi,

check the javascript console in your browser to see if there are some error messages. Also try to check if your yaml contains some formatting errors by running it through a linter

Hi, thank you for your reply. It seems that there is no formatting error (check done through the linter), and this is what I get in the javascript console after completing the customized test:
capture

I actually also see these two warnings when running the same customized config but containing less "trials" (number of answers the subjects have to give). However, I also observed that the issue (error occurring when writing the results to csv) does not appear anymore in the case of the shorter test. Any idea?

does the default.yaml run in your setup (including the csv writeout)?

Also, if you can, post/link your config here, please

default.yaml config works (including the csv writeout). My customized config (with audio contents from webMUSHRA) is below (in .txt format)

custom_config.txt

try removing the spaces from the id fields and add underscores, maybe

it didn't work, any other ideas?

I've updated the yaml parse (see #29) and tested your config. it works for me and the csv writeout seems okay (see attached file).

Please test the PR branch and tell me in the discussion if this fixes your problem.
paired_comparison.csv.txt

Unfortunately it didn't resolve the issue for me. Tried on browsers Chrome, Mozilla Firefox, and Internet Explorer. I am using Windows. Hereafter is what I see in cmd.exe when sending the results (using both PR branch suggested and master):
capture

@bijulette Looks like an php issue. I can't help with windows, sorry. I recommend to try out our docker containers or switch to an older/newer version of php. The docker containers use php 7.0 I am running 7.1 on OS X (worked). If you find a bug, please let us know.

Hi,
Changing for an older php version in Xampp fixed my problem (currently working php version: 7.0.31). Thank you for your help!

okay, what version have you used before?

I was using php version 7.2.5 before.

alright, thanks

@mschoeffler are you aware of any breaking changes in php 7.2?