How to access database files in PreText?

25 views
Skip to first unread message

Barbara Ericson

unread,
Aug 3, 2026, 10:34:26 AMAug 3
to PreTeXt support
I tried using the datafile tag and the @add-files on program but I get an error on the build:

error: Unable to generate some datafiles:

error:  'utf-8' codec can't decode byte 0xd1 in position 31: invalid continuation byte


I am using the bikeshare.db file.

Andrew Scholer

unread,
Aug 3, 2026, 12:36:01 PMAug 3
to pretext...@googlegroups.com
Is this an activecode with language "sql"?

If so, use @database on the <program> to specify the database. Here is an example from the Sample Book:

If you are trying to use some other language to work with the SQLite DB, @database does not work. If that is the case, what language are you using?

Andrew Scholer

--
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 visit https://groups.google.com/d/msgid/pretext-support/ba5e0444-2a40-40d0-a5e6-042172b32851n%40googlegroups.com.
Message has been deleted
Message has been deleted

Barbara Ericson

unread,
Aug 5, 2026, 11:55:15 PM (13 days ago) Aug 5
to PreTeXt support
Thanks.  I was able to get it to work using:

 <program interactive="activecode" language="sql" database="database/bikeshare.db">

Barbara Ericson

unread,
Aug 5, 2026, 11:55:15 PM (13 days ago) Aug 5
to PreTeXt support
Thank you.  I was able to use  program interactive="activecode" language="sql" database="database/bikeshare.db">.  That worked.  

On Monday, August 3, 2026 at 12:36:01 PM UTC-4 asch...@chemeketa.edu wrote:
Reply all
Reply to author
Forward
0 new messages