On Thu, Jan 29, 2015 at 8:29 PM, Francois Bissey <francois.bis...@canterbury.ac.nz> wrote: > Should be solved in rc0 this is Trac #17685. I have been plagued by this for > a while because my machine name is qcd-nzi3 - notice it contains "-n". > Your script similarly has "-n" in it. Automatic fail.
Look at the code there: -if [[ "$1" =~ "--notebook="* || "$1" =~ "-n="* || "$1" =~ "-notebook="* ]]; then +if [[ "$1" =~ ^--notebook=.* || "$1" =~ ^-n=.* || "$1" =~ ^-notebook=.* ]] ; then sage-cleaner &>/dev/null & exec sage-notebook "$@" fi It's depressing to be parsing the command line options to Sage via shell expressions... (It's my fault, I know.) BUMP/PING -- http://trac.sagemath.org/ticket/21 William > > François > >> On 30/01/2015, at 17:12, Rob Beezer <goo...@beezer.cotse.net> wrote: >> >> I have a short chunk of Sage code that I am running from the command line. >> It produces errors with newer versions of Sage, but works as intended with >> older versions (producing a graphics file). Of about 20 such chunks, 3 >> appear to be failing. Is this a known problem? Should I make a ticket? >> Any ideas or suggestions? >> >> (These are produced automatically, which is why some parts look bit odd, but >> it also means they are consistent in many ways.) Facts follow - I can >> provide more if needed. >> >> Invocation: >> /sage/sage-6.5.beta6/sage firstlook02-newton-cooling.sage svg >> >> >> Error: >> CRITICAL:root:unknown notebook: None >> Error, notebook must be one of default, ipython, sagenb but got None >> >> >> firstlook02-newton-cooling.sage: >> import sys >> suffix = sys.argv[1] >> f(x) = 28.6 * exp(-0.0725 * x) + 70 >> p = plot(f, (x, 0, 50), ymin = 55, ymax = 110, thickness=2, >> aspect_ratio=0.4, axes_labels=['$t$','$T(t)$'], fontsize=18) >> plot_idp37915040 = p >> try: >> plot_idp37915040.save("firstlook02-newton-cooling.{}".format(suffix)) >> except ValueError: >> plot_idp37915040.save("firstlook02-newton-cooling.png") >> >> >> Fails: 6.4 (Linux), 6.5.beta6 (Linux), 6.4.1 (Mac) >> Succeeds: 6.0, 6.2, 6.3 (all Linux) >> >> Linux testing is on built-from-source (unsure about Mac binaries). >> >> The following very similar file succeeds with a similar invocation: >> >> firstlook01-exercise-slope-field-1.sage: >> import sys >> suffix = sys.argv[1] >> t = var('t') >> f(x) = 2*x*(1 - x) >> v = plot_slope_field(f, (t,-2,2), (x,-2,2), headaxislength=3, headlength=3, >> axes_labels=['$t$','$x$'], fontsize=18) >> plot_idp38572272 = v >> try: >> >> plot_idp38572272.save("firstlook01-exercise-slope-field-1.{}".format(suffix)) >> except ValueError: >> plot_idp38572272.save("firstlook01-exercise-slope-field-1.png") >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sage-devel" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to sage-devel+unsubscr...@googlegroups.com. >> To post to this group, send email to sage-devel@googlegroups.com. >> Visit this group at http://groups.google.com/group/sage-devel. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-devel+unsubscr...@googlegroups.com. > To post to this group, send email to sage-devel@googlegroups.com. > Visit this group at http://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.