If I change the definition of my-space in your document to just use
make-base-eval, then it works for me. I suspect the problem is that your
evaluator's namespace doesn't have file/convertible attached, whereas
the result of make-base-eval does. I can't explain why it works in
DrRacket, though.
The unmapped local image warning sounds like a profile problem. Maybe
the upload album has been renamed, or maybe an authorization token has
expired. I would recommend recreating the profile and see if that helps.
Ryan
On 03/20/2013 11:10 AM, Patrick King wrote:
On Mon, Mar 18, 2013 at 8:45 PM, Ryan Culpepper <ry...@ccs.neu.edu
<mailto:ry...@ccs.neu.edu>> wrote:
Can you provide a small, self-contained test file?
Yes.
#lang scribble/manual
@title{Problems Uploading Scribbled Plots}
@author{SlowThought}
@(require racket/sandbox
racket/vector
scribble/eval)
@(define my-space(call-with-trusted-sandbox-configuration
(λ()
(make-evaluator 'racket/base
(sandbox-output 'string)
(sandbox-error-output 'string)))))
I am trying to post some examples of @racket{plot} to my blog...
@(interaction
#:eval my-space
(require math plot)
(plot (function sin (- pi) pi #:label "y = sin(x)")))
When I use "Scribble HTML" from within DrRacket, the result is exactly
as you'd expect.
When I use Scriblogify to upload the post to BlogSpot, the figure
generated by
@racket{plot} is replaced by @racket{(object:2d-plot-snip% ...)}.
If I plot @italic{outside} an interaction,
@(require math plot)
@(plot (function cos (- pi) pi #:label "y = cos(x)"))
then things again work as expected locally. When uploading, I get...
@codeblock{C:...\Blog>raco scriblogify -p MyBlog "debug-plot.scrbl"
Warning: unmapped local image: "pict.png"}
This suggests a problem with my profile settings, although I have
intermittently
gotten images to automatically upload. It's not terribly hard to manually
upload them (for that matter, I could manually edit the @racket{interaction}
from within Blogspot), but things are @italic{so} close to being seamless!
Note that while the above renders perfectly via "Scribble HTML", if I
attempt to
scriblogify without commenting out one of the plot commands,
raco barfs up the following...
@codeblock{ C:...\Blog>raco scriblogify -p MyBlog "debug-plot.scrbl"
cannot instantiate `racket/gui/base' a second time in the
same process
context...:
C:\Program
Files\Racket\collects\mred\private\wx\common\once.rkt: [running body]
C:\Program
Files\Racket\collects\mred\private\wx\common\utils.rkt: [traversing imports]
C:\Program
Files\Racket\collects\mred\private\wx\win32\wndclass.rkt: [traversing
imports]
C:\Program
Files\Racket\collects\mred\private\wx\win32\init.rkt: [traversing imports]
C:\Program
Files\Racket\collects\mred\private\wx\win32\platform.rkt: [traversing
imports]
C:\Program
Files\Racket\collects\mred\private\wx\platform.rkt: [running body]
C:\Program Files\Racket\collects\mred\private\kernel.rkt:
[traversing imports]}
Looking over the above, I withdraw my 5.3.3 complaint. The intermittent
image upload problem may be
a profile problem of mine. Scriblogify's balking at plots both inside
and outside an interaction is a
new (to me) quirk.
As always, thanks to the community for all your help.
@; End of "debug-plot.scrbl"
____________________
Racket Users list:
http://lists.racket-lang.org/users