Menu Close

Pysyncrosim giving R error

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22529
    Katrina SzeteyKatrina Szetey
    Participant

    I am working through the quickstart tutorial on the pysyncrosim readthedocs page, and I have reached the point where you run the scenario. My code generated an error and the error reads as though it’s come from the R package. I am using Syncrosim V2.4.44 and using Jupyter Lab as an IDE.

    The error is:
    RuntimeError: The external program failed.
    Program name was: C:\Program Files\R\R-4.3.2\bin\Rscript.exe
    Arguments were: “C:\Users\User\SyncroSim\Packages\helloworldTime\model.R”
    Exit code was: 1
    More information:
    Error in library(rsyncrosim) : there is no package called ‘rsyncrosim’
    Execution halted

    #22530
    katie-birchardkatie-birchard
    Keymaster

    Hi Katrina,

    Although you are running SyncroSim from python, the helloworldTime SyncroSim Package is built using an R script and requires the R package rsyncrosim to be installed. I realize that having to install an R package to run the pysyncrosim tutorial is a bit strange. We will update the tutorial in the next week, but in the meantime you can get the scenario to run by first installing the rsyncrosim package in R using: install.packages("rsyncrosim").

    Cheers,
    Katie

    #22534
    Katrina SzeteyKatrina Szetey
    Participant

    Hi Katie

    Thank you, that worked. On a different point, if you’re updating the tutorial soon you might want to change the frame.append() code, as that’s being deprecated. I used pandas to do the same with this code:

    import pandas as pd
    new_dataframe = pd.DataFrame([myInputDict])
    myInputDataframe = pd.concat([myInputDataframe, new_dataframe], ignore_index=True)

    #22535
    katie-birchardkatie-birchard
    Keymaster

    Thanks! We will go through and make sure all code is up to date for the next documentation release.

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