Help needed with: "cannot instantiate `racket/gui/base' a second time in the same process context"

50 views
Skip to first unread message

Tiina Partanen

unread,
Sep 1, 2015, 6:57:01 AM9/1/15
to Racket Users
Hi,

I uploaded my very first package and scribble docs to the Racket package server. It seems that there is something wrong in my scribble files since the docs don't show up and I get this error:
"cannot instantiate `racket/gui/base' a second time in the same process context"?

Here is the whole error log:
http://pkg-build.racket-lang.org/server/built/fail/teachpacks.txt

And this is the package source:
https://github.com/tyynetyyne/teachpacks

Can anyone help me with this?

Thanks,
Tiina


Matthew Flatt

unread,
Sep 1, 2015, 7:49:28 AM9/1/15
to Tiina Partanen, Racket Users
The problem is that the documentation-build process cannot support a
use (direct or indirect) of `racket/gui/base` at documentation-build
time. The

@(require teachpacks/racket-turtle)

in your ".scrbl" files is the main problem, since that indirectly loads
`racket/gui/base`.

It looks like you were also trying to run `teachpacks/racket-turtle`
via `interactions`, which could cause similar trouble, but you've
resorted to re-rendering the images. That's essentially the only
answer, but the `scriblib/gui-eval` library can help generate the
images if `racket/gui/base` needs to run to generate the images.

If the images really only need `racket/draw`, then maybe you could
split the library so that the drawing part is separate from the GUI
part (i.e,. the drawing functions are in a module that doesn't
transitively import `racket/gui/base`. Then, you can use the drawing
part from the documentation, even if the library is meant to be used
with the GUI part.
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to racket-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Tiina Partanen

unread,
Sep 7, 2015, 3:05:16 PM9/7/15
to Matthew Flatt, Racket Users
I removed all dependencies for UI components and now it works! Here is a link to the documentation if someone is interested to play with a new Turtle-graphics package using big-bang animation:

http://pkg-build.racket-lang.org/doc/racket_turtle/index.html

The Package Manager/Package Server - system is a nice piece of work! I was so happy to see my package download and install today without any complications.

Thank you for your help (again),
Tiina

Reply all
Reply to author
Forward
0 new messages