CLI requires WW exercise?

7 views
Skip to first unread message

Bruce Yoshiwara

unread,
Sep 5, 2023, 1:01:40 PM9/5/23
to PreTeXt support
I’ve recently found that my scratch book won’t process unless it contains a WebWorK exercise. Without any WW exercise, (basically the book has two Tikz images)  I got:
PreTeXt project found in `/home/byoshiwara/scratch`.
warning: Using CLI version 1.8.0 but project's `requirements.txt`
warning: is configured to use 1.7.4. Consider either installing
warning: CLI version 1.7.4 or changing `requirements.txt` to match 1.8.0.
Since no build target was supplied, the first target of the project.ptx manifest (web) will be built.

Traceback (most recent call last):
  File "/home/byoshiwara/.local/bin/pretext", line 8, in <module>
    sys.exit(main())
  File "/home/byoshiwara/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/byoshiwara/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/byoshiwara/.local/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/byoshiwara/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/byoshiwara/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/byoshiwara/.local/lib/python3.8/site-packages/pretext/cli.py", line 441, in build
    if ("webwork", "") not in asset_table or asset_hash_dict[
KeyError: ('webwork', '')


However, if I include a WW exercise, the html of the scratch book is produced without warnings.

This issue may have started when I upgraded to 1.8.0, but it persisted when I went back to 1.7.4. I use this scratch book as a place to practice markup/coding.

I've also had a new error regarding an "include" on a line that used to be ok.  The error  message ended with the two lines


  File "/home/byoshiwara/scratch/source/scratch.xml", line 5
lxml.etree.XMLSyntaxError: Namespace prefix xi on include is not defined, line 5, column 41

where line 5 was
<xi:include href="./meta_docinfo.ptx" />


Bruce

Oscar Levin

unread,
Sep 5, 2023, 4:59:28 PM9/5/23
to pretext...@googlegroups.com
Hi Bruce,

Thanks for the report; I'll look into it tonight.  It is possible that this is already fixed for the 2.0 release coming this weekend, but it will be good to check.

In the meantime, you should be able to use the -q flag when building to avoid the webwork issue.

I really don't know what to make the of the xi:include issue.  Does the file that has that line have the magic namespace command in its root element?  (i.e., xmlns:xi="http://www.w3.org/2001/XInclude")

--
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/c68cba88-189c-4a06-9996-9c47201b411an%40googlegroups.com.

BRUCE YOSHIWARA

unread,
Sep 5, 2023, 8:07:02 PM9/5/23
to pretext...@googlegroups.com
Hi Oscar,

Thanks. And yes, the file that I was trying to include does contain the magic namespace command. For now I've just pasted in the docinfo file.

Bruce



--
---------------------------------------------------------------------- 
byosh...@hotmail.com 
Mastodon: @byosh...@mathstodon.xyz
Blog: http://byoshiwara.blogspot.com/ 
Webpage: https://byoshiwara.github.io   

"I'm supposed to respect my elders, but now it’s getting harder and harder for me to find one." --Winston Churchill

----------------------------------------------------------------------

Rob Beezer

unread,
Sep 5, 2023, 8:31:48 PM9/5/23
to pretext...@googlegroups.com
The "xi" needs to be defined in the file *doing the including*, not in the file
*being included*.
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/c68cba88-189c-4a06-9996-9c47201b411an%40googlegroups.com <https://groups.google.com/d/msgid/pretext-support/c68cba88-189c-4a06-9996-9c47201b411an%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/CAOU9BaUirUnZq7KKYiBgTZGLEyqkb0VY-tmV%2B8UBR775-WfKcA%40mail.gmail.com <https://groups.google.com/d/msgid/pretext-support/CAOU9BaUirUnZq7KKYiBgTZGLEyqkb0VY-tmV%2B8UBR775-WfKcA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> ----------------------------------------------------------------------
> byosh...@hotmail.com <mailto:byosh...@hotmail.com>
> Mastodon: @byosh...@mathstodon.xyz <mailto:byosh...@mathstodon.xyz>
> Blog: http://byoshiwara.blogspot.com/ <http://byoshiwara.blogspot.com/>
> Webpage: https://byoshiwara.github.io <https://byoshiwara.github.io/>
>
> "I'm supposed to respect my elders, but now it’s getting harder and harder for
> me to find one." --Winston Churchill
>
> ----------------------------------------------------------------------
>
> --
> 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
> <mailto:pretext-suppo...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/CAMxbPO4%3DNuQ8c0dH2QStSZLLausAB-f7RP3v42wRj-w9SKcznw%40mail.gmail.com <https://groups.google.com/d/msgid/pretext-support/CAMxbPO4%3DNuQ8c0dH2QStSZLLausAB-f7RP3v42wRj-w9SKcznw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

BRUCE YOSHIWARA

unread,
Sep 6, 2023, 3:48:20 PM9/6/23
to pretext...@googlegroups.com
Thanks Rob. I don't really know how I managed to delete that, but now things are well except for the WeBWorK issue.

Bruce

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/MTAwMDAwNC5iZWV6ZXI.1693960306%40quikprotect.


--
---------------------------------------------------------------------- 
byosh...@hotmail.com 
Mastodon: @byosh...@mathstodon.xyz
Blog: http://byoshiwara.blogspot.com/ 
Webpage: https://byoshiwara.github.io   

"I'm supposed to respect my elders, but now it’s getting harder and harder for me to find one." --Winston Churchill

----------------------------------------------------------------------

Oscar Levin

unread,
Sep 6, 2023, 4:49:01 PM9/6/23
to PreTeXt support
The webwork issue should be fixed if you upgrade to 1.8.1.  

It is already fixed in the nightly 2.0 previews, and seemed to only show up if you had webwork, then removed it, so not an obvious bug to test for.  

Reply all
Reply to author
Forward
Message has been deleted
0 new messages