Hi, I am a new user of HighSchoolBiology library. I want to use it to simulate the pandemic dynamics. But when i download the HighSchoolBiology.nb and open it, and click the “Try the lab”, it warns the following information
"DirectoryName::string: String expected at position 1 in DirectoryName[$Failed[[1]][SourceFile]]."
Any advice is appreciated. Thank you.
shenghuiy
(Shenghui Yang)
May 15, 2020, 8:49pm
2
You may try to save the notebook to a path free of non-ascii character.
Thank you. How to see if the path contains non-ascii character? My path is
“/Users/qunyongwang/test”
Thanks again.
shenghuiy
(Shenghui Yang)
May 15, 2020, 9:58pm
4
Assuming you are working on Mac? Your path looks fine. I just download the latest version and it works out of box on OS X Catalina 10.15.4.
Many thanks again. I updated my computer. But it doesn’t work. I don’t know what is wrong with it.
ankitn
(Ankit Naik)
May 25, 2020, 7:09am
6
Hi Qunyong,
Can you try the following steps and let me know at which step you are facing an issue?
Step 1: Download library files
library =
Import[URLDownload[
"http://dl.wolframcdn.com/0036F4/pub/WSMVirtualLabs/\
HighSchoolBiology/1.1.0.0/HighSchoolBiology_1.1.0.sma"], "SMA"][[1]];
Step 2: Get the library path
libraryPath = library["SourceFile"];
Step 3: Function to open a library nb
lab[x_] :=
NotebookOpen[
FileNameJoin[{DirectoryName[libraryPath], "Resources",
"LabNotebooks",
ToString[{"PlasmaMembrane", "FoodMetabolism", "Ibuprofen",
"NaturalSelection", "HerdImmunity"}[[x]]] <> ".nb"}]]
Step 4: Open the Herd Immunity lab
lab[5]