I'm trying to create an object via the debug prompt using
./bin/instance debug (my zope instance is buildout based, on OSX).
However, each time I enter: "from worldcookery.recipe import Recipe"
the prompt just quits out, no error, nothing ...
'import urllib' works
'import worldcookery' works
'import worldcookery.recipe' doesn't work
If I mistype the name on purpose, it gives a 'proper' error.
./bin/instance fg and start both run the server fine with no errors
and I can browse the default Zope3 site.
Where am I going wrong?
Jon Hadley
http://jon-hadley.com
Hi Jon,
> However, each time I enter: "from worldcookery.recipe import Recipe"
> the prompt just quits out, no error, nothing ...
>
> 'import urllib' works
> 'import worldcookery' works
> 'import worldcookery.recipe' doesn't work
>
I had something very similar when using a from-source Python 2.5 build
on Leopard which hadn't been compiled with the magic make-it-work-on-
Mac-OS-X configure option:
./configure MACOSX_DEPLOYMENT_TARGET=10.5
Does that match your case? Otherwise, what's your environment?
Cheers,
Dan
--
Dan Fairs <dan....@gmail.com> | http://www.stereoplex.com/
Hm! Just saw Jim's answer on Zope3-Users.
http://mail.zope.org/pipermail/zope3-users/2008-June/007972.html
Interesting. Would love to know what causes it to keel over with nary
an error...
His follow up, to use:
parts/application/debugzope -C parts/instance/zope.conf
Bought it a stage forward, but now i'm getting a bus error. Progress
in some form I suppose.....
Someone else has suggested it's a readline error, but i *thought* I
had installed support for this already (from your instructions). I can
edit a line with the right and left keys and up brings back a history
... thats readline right?
Jon Hadley
http://jon-hadley.com
Interesting. The 'Bus Error' went away for me when following those
instructions (and including the MACOSX_DEPLOYMENT_TARGET). Indeed, the
readline thing sounds fixed for you.
Does everything work as expecting when you don't start up a Zope debug
shell, just a regular Python prompt?
/me wonders if your Python is using the correct libraries, but the
Zope install isn't... Remember Zope isn't pure Python, it has some
bits in C. I can't remember the Zope 3 build process off the top of my
head, but if the library issue is the case, then hopefully you'll be
able to specify library paths at some point in the build - probably in
a ./configure line? Warning, I'm handwaving a bit here.
(fwiw, using the Python 2.5 process I described, I've successfully got
Grok up and running on Leopard, which requires Zope 3 of course)
Back a few steps I go!
(also posted to zope3-users)
Jon Hadley
http://jon-hadley.com
./configure MACOSX_DEPLOYMENT_TARGET=10.5 LDFLAGS=-L/opt/local/lib
OPT=-I/opt/local/include
Oddly, whatever I built before, must of been enough to run plone, but
not zope ;)
Jon Hadley
http://jon-hadley.com
Excellent! Good troubleshooting there.
/me notes down for future reference