WebWork Error

84 views
Skip to first unread message

Geoffrey Cox

unread,
Apr 12, 2018, 4:53:12 PM4/12/18
to PreTeXt support
Hello,

I am trying to embed WebWork problems into PreTeXt and I after setting everything up, I received the following error message in the Webwork problem display field:


WeBWorK error


An error occurred while processing your request. For help, please send mail to ...


Error messages

invalid characters in 'problemID' field: 'html2xml' (valid characters are [0-9]) at /opt/webwork/webwork2/lib/WeBWorK/URLPath.pm line 1263.


Has anyone encountered this error or have an idea about what is causing it?

Thanks,
Geoff 

Alex Jordan

unread,
Apr 12, 2018, 5:12:09 PM4/12/18
to pretext...@googlegroups.com
Hi Geoffrey,

Is this from trying to build the sample chapter, or trying to build something in your own project? Either way, would you post the source PTX here? Specifically the enclosing `<exercise>` element and its content should be enough. If that is not enough to help us see the issue, could you post the HTML output somewhere public and let me look at the page there?

Alex

--
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-support+unsubscribe@googlegroups.com.
To post to this group, send email to pretext-support@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/158dad1a-16d0-40c2-85b5-25519d32cc93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Geoffrey Cox

unread,
Apr 13, 2018, 4:03:16 PM4/13/18
to PreTeXt support
Hello and thanks for the quick reply Alex.

I am trying to add a webwork exercise to the bottom of the "Computational" section of the "minimal.xml" file found in the mathbook\examples\minimal directory.  Here is the way I am calling the exercise element in minimal.xml

<exercise>
   
<webwork>
     
<statement>
         Hello
     
</statement>
   
</webwork>
</exercise>

Here is a link to the Broken WebWork Problem

The anonymous WebWork course that I setup is here: http://euler.vmi.edu/webwork2/anonymous/

I am compiling minimal.xml using 

$ ~/xsltproc/xsltproc.exe --stringparam webwork.server http://euler.vmi.edu/webwork2/anonymous ../../xsl/mathbook-html.xsl minimal.xml

Thanks for all the help!

Geoff

Rob Beezer

unread,
Apr 13, 2018, 4:23:39 PM4/13/18
to pretext...@googlegroups.com
Dear Geoffrey,

Try wrapping the "Hello" in a "p" element. May not be required, but will not hurt.

Alex can confirm, but try shortening up the webwork.server parameter to
something more like

http://euler.vmi.edu

(try some variants if that does not do it, or look in the build script for the
example WW chapter)

Rob

On 04/13/2018 01:03 PM, Geoffrey Cox wrote:
> Hello and thanks for the quick reply Alex.
>
> I am trying to add a webwork exercise to the bottom of the "Computational"
> section of the "minimal.xml" file found in the mathbook\examples\minimal
> directory. Here is the way I am calling the exercise element in minimal.xml
>
> |
> <exercise>
> <webwork>
> <statement>
> Hello
> </statement>
> </webwork>
> </exercise>
> |
>
> Here is a link to the Broken WebWork Problem
> <http://www.beastmathster.com/wp-content/uploads/section-computation.html>
>
> The anonymous WebWork course that I setup is here:
> http://euler.vmi.edu/webwork2/anonymous/
>
> I am compiling minimal.xml using
>
> $ ~/xsltproc/xsltproc.exe --stringparam webwork.server
> http://euler.vmi.edu/webwork2/anonymous ../../xsl/mathbook-html.xsl minimal.xml
>
> Thanks for all the help!
>
> Geoff
>
> --
> 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 post to this group, send email to pretext...@googlegroups.com
> <mailto:pretext...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pretext-support/41dd3494-d05c-414a-adf7-de248fa50289%40googlegroups.com
> <https://groups.google.com/d/msgid/pretext-support/41dd3494-d05c-414a-adf7-de248fa50289%40googlegroups.com?utm_medium=email&utm_source=footer>.

Alex Jordan

unread,
Apr 13, 2018, 4:50:55 PM4/13/18
to pretext...@googlegroups.com
Just confirming that I think Rob has it right. Try those two changes first, especially about the server param. Let us know how that goes.



To unsubscribe from this group and stop receiving emails from it, send an email to pretext-support+unsubscribe@googlegroups.com <mailto:pretext-support+unsubscr...@googlegroups.com>.
To post to this group, send email to pretext-support@googlegroups.com <mailto:pretext-support@googlegroups.com>.
--
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-support+unsubscribe@googlegroups.com.
To post to this group, send email to pretext-support@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pretext-support/5fe1c96c-ee7a-5109-c433-aa1885a4b656%40ups.edu.

Geoffrey Cox

unread,
Apr 13, 2018, 5:08:06 PM4/13/18
to PreTeXt support
Thanks for the suggestions.

I first tried wrapping hello in a <p> element.  Same issue

Next, I changed the webwork.server parameter to http://euler.vmi.edu.  This removes the webwork error message, but it now the blue exercise field is blank (No "Hello").

Any other suggestions?



 

Alex Jordan

unread,
Apr 13, 2018, 5:16:18 PM4/13/18
to pretext...@googlegroups.com
Certain browsers do not like letting you see content from two different protocols at the same time. What I mean here, is seeing the webwork content (using http protocol) at the same time as seeing the surrounding HTML (using file protocol) from your local file folders. Similar things can happen with other features, like Sage cells.

What you describe here sounds exactly like what happens when this is the "issue". I say that in quotation marks, because it's not exactly an issue for anyone to fix. But to work around it and see your full output while you are still working on things, I find that I do not have this happen if I use Firefox. At least not now with the current version of FF and default settings.

You can also push all your output to a web server and then view it using http (or https). Then you really see what your future readers will see.

Or there are ways to activate localhost on your machine to view local files using http too.

All of this is supposed to get documented in the publisher guide, and maybe it already is.

--
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-support+unsubscribe@googlegroups.com.
To post to this group, send email to pretext-support@googlegroups.com.

Rob Beezer

unread,
Apr 13, 2018, 6:15:52 PM4/13/18
to pretext...@googlegroups.com
On 04/13/2018 02:16 PM, Alex Jordan wrote:
> Or there are ways to activate localhost on your machine to view local files
> using http too.
>
> All of this is supposed to get documented in the publisher guide, and maybe it
> already is.

An author's problem. First FAQ here:

http://mathbook.pugetsound.edu/doc/author-guide/html/faq.html

Be sure to follow the link to see full details. Just read last night that

$ npm http-server

will install a similar tool (Javascript, I guess?).
Reply all
Reply to author
Forward
0 new messages