Troubleshooting

PennController for IBEX Forums Troubleshooting

Tagged: 

Viewing 15 posts - 31 through 45 (of 75 total)
  • Author
    Posts
  • #7748
    Aref
    Participant

    Hi Jeremy,
    Today I encountered a problem that had never happened before. When I download the results of the “advanced tutorial” and the “template masked priming” experiments, there are missing columns. In the “advanced tutorial” results, information about “ID”, “item” and “condition” are missing. And in the masked priming, information about “Group”, “Condition”, “Expected” and “PrimeType” are missing. So I can’t use the tidy code in the advanced tutorial section to examine the results. This hadn’t happened before.
    Thanks

    #7751
    Jeremy
    Keymaster

    Hi,

    Did you double-check which ) your .log commands were attached to? It’s a common issue to attach them to a PennController element instead of newTrial, in which case you are actually calling a different log command, eg:

    newTrial(
      newScale("yesno", "Yes", "No")
        .button()
        .print()
      ,
      newButton("Next")
        .print()
        .wait( getScale("yesno").test.selected()
    )    
    .log( "ID", GetURLParameter("id") )
    )

    In this code, although the indentation would be consistent with log attaching to newTrial, it actually attaches to the closing parenthesis of wait, so effectively to the Button element. You can see that there is a ) on the line under log that actually closes newTrial

    Jeremy

    #7754
    Aref
    Participant

    Yes, it is attached to “newTrial”. As a matter of fact, it is not my code; it’s the code in the advanced tutorial and template masked priming code. Three days ago I didn’t have this problem. Now I can’t even tidy the advanced tutorial results with the R code that is provided in the tutorial. Here’s the R code:

    tidied_results <- results %>%
      filter(PennElementName == "side-by-side" | PennElementName == "selection") %>%
      select(ID, group, item, condition, PennElementName, Value, EventTime) %>%
      group_by(ID, item) %>%
      mutate(event = case_when(PennElementName == "side-by-side" ~ "canvas_time",
                               PennElementName == "selection" ~ "selection_time"),
             selection = case_when("singular" %in% Value ~ "singular",
                                   "plural" %in% Value ~ "plural",
                                   FALSE ~ NA_character_),
             EventTime = if_else(EventTime == "Never", NA_real_, suppressWarnings(as.numeric(EventTime)))) %>%
      ungroup() %>%
      select(-PennElementName, -Value) %>%
      pivot_wider(names_from = event, values_from = EventTime)

    And here’s the error message:
    Error: Can’t subset columns that don’t exist.
    x Column ID doesn’t exist.

    Until three days ago, after reading in the results.csv, the results variable had the “ID”, “item”, and “condition” columns. But, now they dont!

    #7755
    Jeremy
    Keymaster

    Hi,

    I just took a test run of the Advanced Tutorial project and loaded the results file in R using read.pcibex and then I ran your code, and it works like a charm. Could it be that you’re working on a different R session than three days ago that has a different results data frame?

    Jeremy

    #7758
    Aref
    Participant

    Apparently the function that I was using to read in the csv files was different form the one on the advanced tutorial. Thank you very much, Jeremy.

    #7762

    thank you for information

    #7775
    slymnymn
    Participant

    Hi Jeremy,

    I’m designing a self paced reading task. Having uploaded two separate csv files for practice and experimental items, I have only coded until the practice section of the code with DashedSentence controller in conjunction with Template for practice items file. The problem is that the controller retrieves sentences from the csv file containing experimental items instead of one with practice sentences even though I have speficied the template for the latter. Moreover, I did not call the stimuli csv in any section of the code and still encounter this bug. What am I missing? Here is the link to the experiment (ignore Turkish instructions, stimuli sentences are in English):

    https://farm.pcibex.net/r/nwtLDA/

    Best,

    #7776
    slymnymn
    Participant

    Edit: Changing the code from Template(“exercise.csv” ….) to Template(“exercise.csv”, row => ….) seems to have done the trick. Since I can’t remove my question, I prefer to attach it as a reply here.

    #7780
    Jeremy
    Keymaster

    Hi,

    Glad to see that you have fixed the issue. Indeed, when specifying which table to use with the Template command, the expected format is Template( "table_filename.csv" , row => newTrial(/* trial content */) )

    Jeremy

    #7793
    monicado
    Participant

    Hi Jeremy,

    I’ve got two questions:

    1) I was trying to sync my experiment (https://farm.pcibex.net/r/FzdhBx/) with the GitRepository (https://github.com/PennController/penncontroller/), selecting the Main Branch, to get the Beta 2.1 version that you mentioned before. But, I keep getting an error that says the repository is too big to sync. Is this the right repository/branch to select?

    2) I’ve been noticing that my PCIbex Farm has been saving either very intermittently or very slowly. I basically have to refresh the page every time in order for it to register any changes I’ve made to the script. A bit ago, other folks in the lab had mentioned encountering the same problem as well. Is there a way to fix this?

    Thanks so much!
    Monica

    #7794
    monicado
    Participant

    Hi Jeremy,

    To follow up on this – I am wondering if the issue with saving is also affecting the files that I need to preload. For instance, for the following experiment (https://farm.pcibex.net/r/MxiUwp/), I just changed the names of the files on my .csv and updated the .zip folder that has the corresponding video files on the server. But, the downloads that are happening are just for the files that were previously unchanged. I haven’t changed the script besides this.

    #7796
    Jeremy
    Keymaster

    Hi Monica,

    1) You cannot sync projects with https://github.com/PennController/penncontroller/ because that repository does not consist in a (PC)Ibex project’s directory structure. If you’d like to try out 2.1 beta, you should simply download it from here directly and upload it to your project’s Modules folder to overwrite the existing PennController.js file. Keep in mind that 2.1 beta is work in progress: I haven’t released it yet, so the version currently on the repo is susceptible to change any time (so if you download it today and download it again in, say, 2 months, you might get two different versions, if I made edits in the meantime)

    2) I think the issue you’re describing has to do with the farm sometimes internally creating multiple copies of the same file (eg. main.js) and, as a result, it alternates which copy it saves your edits into, and which copy it serves while running the experiment, so your latest edit aren’t always reflected when running the experiment. I am working on fixing this bug, but in the meantime, if that happens, select all the text in the editor, copy it and paste it somewhere safe, then delete the file from your project (the farm will delete all internal copies with the same name), then recreate it, and paste the content you copied earlier. This way, your project will internally have a single copy of the file again, and the problem should go away. Repeat the procedure if it starts happening again

    Regarding the files you need to preload: it could be that you experience the same issue when editing your CSV file, in which case your latest modifications to it might not be reflected when taking the experiment. If that’s the case, follow the procedure I just described. It could also be that, if you uploaded a new version of the zip file to your webserver, your browser still reuses an older version it kept in cache. If that’s the case, a full refresh should make sure your browser fetches the most recent version of the zip file

    Let me know if problems persist

    Jeremy

    #7799
    monicado
    Participant

    Hey Jeremy,

    1) Got it! I have tested the Beta version on my experiment a few times now and it has seemed to work so far! Thanks again!

    2) I’ve tried both deleting/re-creating the experiment and restarting my browser. It seems to be loading everything properly now. I’ll continue to test and let you know if an issue comes up!

    Thanks again so much Jeremy! 🙂

    #7800
    monicado
    Participant

    Hi again Jeremy,

    I’m sorry about this, but the problem seems to be recurring. The full download of all my resources worked once when I tried the experiment in Safari. But, I emptied my cache in Chrome and restarted my computer and when I tried it again, it was downloading just the same files as before. Safari is also doing the same thing now. As far as I can tell, the file names are exactly the same in the zip and csv.

    I’ve also tried to delete/recreate the project again and the same problem continues. Here is the slug for the recreated project: https://farm.pcibex.net/r/RLxaZJ/

    #7801
    Jeremy
    Keymaster

    Hey Monica,

    I’m curious: how do you determine whether you’re watching new or old versions of the videos? When I take your experiment, I get “preloading” messages, but that goes away when I upload PennController 2.1 beta in a copy of your project. Then, preloading happens fast enough that I don’t even see the “preloading” messages anymore when I get to the first training trial, and everything goes smoothly. But, of course, not having seen the old videos, I can’t tell whether I’m watching the new ones or not

    In my case, I manually download the zip file by entering its URL in the address bar of my browser, and then I can compare with what I see when I take the experiment. I haven’t seemed to notice any difference so far (except there are more video files in the zip files that actually used in the experiment)

    Jeremy

Viewing 15 posts - 31 through 45 (of 75 total)
  • You must be logged in to reply to this topic.