Having trouble with uploading .csv files

PennController for IBEX Forums Support Having trouble with uploading .csv files

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6592
    rhododendron
    Participant

    Dear Jeremy,

    I am writing to you because I have some issues with uploading .csv files to Ibex. The moment I upload a CSV file to the chunk_includes bit, the experiment is stuck on Loading… As soon as I remove the file everything is just fine. I am wondering why this happens since I have worked with tables and templates before and never encountered any of these issues.
    I made sure to update the PennController to the latest version and to upload CSV files only. I thought that editing the file in Excel might trigger problems so I tried creating the CSV file in OpenCalc, but this does not seem to help anyway. I also made sure to transform umlauts to the appropriate HTML coding. Not sure what to do next because this is the only way I can program my SPR-study.

    Maybe it is important to mention that I have some functions in the main.js file (including the dashed sentence and a few other things I have found on the support blog such as cumulative functions – could they be the source of the problem?)

    I would really appreciate your help and wish you a wonderful week!

    Best wishes,
    Ana

    #6594
    Jeremy
    Keymaster

    Dear Ana,

    Did you leave the Debug window open, and if so, does it report any error message?

    Does your script refer to that CSV file in a Template command? If so, does commenting out the Template command make the problem go away, or does it persist regardless as long as the CSV file is in your Resources/chunk_includes folder?

    Feel free to let me know (here or at support@pcibex.net) what account/experiment you’re experiencing this issue with, and I’ll take a look

    Best,
    Jeremy

    #6633
    rhododendron
    Participant

    Dear Jeremy,

    thank you so much for your answer! I do not know exactly what I did, but the problem was fixed.
    Along the process, I have encountered a new, mysterious problem: The number of intended experimental trials in the CSV file does not show up as expected in the experiment. To be more precise, there are 120 trials that I want to include in the experiment, but only 80 show up and there is no reason why the last 40 ones would not show up. Honestly, I cannot think of any reason why this would happen. I suspected it could have been the fault of the CSV, but then I tried filling it with the same sentence and condition sets 120 times and the problem persisted.

    I have also checked the Table from the Debugger Window and it turns out all rows are read properly into Ibex. It’s just that they do not show up in the Sequence.

    I would be very grateful for your input on this!
    Thank you so much!

    Best wishes,
    Ana

    #6634
    Jeremy
    Keymaster

    Hello Ana,

    Double-check the labels you reference in your Sequence command and the ones you assign your trials in your Template command. Feel free to send me the link to your experiment, either here or at support@pcibex.net, if you’d like me to have a look

    Jeremy

    #6635
    rhododendron
    Participant

    Dear Jeremy,
    thank you so, so much for your quick reply!

    I double-checked again, but all seems to be right in terms of labels. It would actually be wonderful if you could take a look at the problem. The link of the experiment is:https://expt.pcibex.net/ibexexps/plescama/Master/experiment.html (username:plescama)

    I cannot thank you enough!

    Best,
    Ana

    #6636
    Jeremy
    Keymaster

    Dear Ana,

    You have these two lines in your code (PennController. prefix removed):

    Template( GetTable("master_spr.csv")
                             .filter("type" , ("critical", "filler"))

    The filter command can only take one string or one regular expression as its second argument. In your case, you could use the regular expression /^(critical|filler)$/

    Note that grouping a pair of strings in parentheses the way you did is not standard JavaScript syntax. I was surprised that that bit of code did not throw an error, and I had to do some testing to understand how JavaScript processes those parenthesis entities. It seems that it systematically returns the last member only, so in your case it would simply return "filler", which would explain why you end up with 80 items (there are exactly 80 fillers in your table).

    Jeremy

    #6644
    rhododendron
    Participant

    Dear Jeremy,
    thank you so, so very much for your help! This definitely fixed the issue! I am very grateful for the fact that you looked into this!
    Have a great week!
    Ana

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.