datafile not being built in Runestone text

49 views
Skip to first unread message

Celine Latulipe

unread,
May 16, 2024, 11:43:18 AM5/16/24
to PreTeXt support
Hi! 

I'm working on a Java Active Learning workbook to be hosted on Runestone (not really delivering content, just scaffolded exercises for in class or practice use). I'm struggling with Java File I/O on Runestone in general and would love advice on that. 

But the immediate issue I have is that a datafile (that I want to use for students to practice file input reading) is not being built and put into the generated assets folder. Screenshot of code below, with datafile section highlighted, and note that the build was successful (see Terminal), but there is no text file showing up in the generated-assets. I'm sure I must be doing something wrong, but I'm not sure what. I've also tried running 'pretext generate -x "FILE_IO-df1" ' and 'pretext build -g', but the datafile still doesn't appear to be generated.

FileIO-datafile-not-built.png

Andrew Scholer

unread,
May 16, 2024, 5:55:18 PM5/16/24
to pretext...@googlegroups.com
Celine -

I could be wrong, but my understanding is that a datafile where the contents is stored inline like that will NOT produce a generated file. Instead, that data will get put in a manifest file that Runestone reads into its database. When Runestone needs to run the java, it takes that database contents and writes that to a file on the server that will be running the Java code.

If you build with a target of runestone instead of HTML, your output directory should end up with a file called runestone-manifest.xml. It contains the information that will be added to the Runestone DB for your book. You should see the contents of the datafile inside that file.

Andrew Scholer (he/him/his)
Computer Science Instructor/Program Chair
Chemeketa Community College


--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/3536c71b-2a9e-4b84-8e94-632d95f38e3fn%40googlegroups.com.

Celine Latulipe

unread,
May 17, 2024, 5:23:27 PM5/17/24
to PreTeXt support
Hmm. Okay, well, I see the runestone-manifest.xml file in my local build. When I build and deploy on Runestone academy it shows that there is a datafile, but when I try to run the activecode that is supposed to read it in, the file is not found:

DataFile_notFound_Runestone.png

Andrew Scholer

unread,
May 20, 2024, 11:42:26 AM5/20/24
to pretext...@googlegroups.com
Celine - 

Does the runestone-manifest.xml have the contents of your data file somewhere inside of it?

Assuming it does, the issue sounds like it is on the Runestone side (serving the book and executing the program) and not on the PreTeXt side (authoring the book). 

The Runestone Discord is generally a better place to get Runestone help. I know you have asked other questions there in the past, I would suggest asking this one there to see if Brad or someone in that community has other suggestions.

Andrew Scholer (he/him/his)
Computer Science Instructor/Program Chair
Chemeketa Community College

Celine Latulipe

unread,
May 21, 2024, 1:45:24 PM5/21/24
to PreTeXt support
I figured out the issue. I didn't have a datafile attribute in the activecode.

Celine

Reply all
Reply to author
Forward
0 new messages