Kid import error from quickstart

0 views
Skip to first unread message

Steven Kryskalla

unread,
Jan 21, 2006, 1:13:46 PM1/21/06
to TurboGears
Hello,

When running tg-admin quickstart I get a traceback that kid does not
have attribute HTMLSerializer. The reason why kid does not have
HTMLSerializer is because view.py is importing the kid script, not the
kid package!

If I stick "print kid.__file__" after importing kid in view.py, I get
this path:

c:\python24\lib\site-packages\kid-0.8-py2.4.egg\EGG-INFO\scripts\kid

Which is not right, but if I hard code the path by using something like
imp.load_module("kid", None,
'c:\\python24\\lib\\site-packages\\kid-0.8-py2.4.egg\\kid', ('', '',
5)), then it naturally gets the right kid package:

c:\python24\lib\site-packages\kid-0.8-py2.4.egg\kid\__init__.pyc

I had this problem a few months ago with 0.8a5, which I got around by
using load_module. I also got it just now after updating to 0.8.8. I
followed the normal install instructions for Windows, but it seems like
something is messed up on my end. I don't see any other people having
this problem, but just in case this was my cheap solution (short of
reinstalling everything).

Steve

Kevin Dangoor

unread,
Jan 23, 2006, 10:44:20 AM1/23/06
to turbo...@googlegroups.com
Hi Steve,

That's very strange. Do you have any kind of manually set pythonpath?
There must be something different in your environment, because this is
the first I've seen of this.

Kevin


--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: k...@blazingthings.com
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Steven Kryskalla

unread,
Jan 24, 2006, 12:55:51 PM1/24/06
to TurboGears
I know what's happening now. tg-admin is running from the
\python24\scripts directory, where there is a kid.py script, so it's
actually importing that. If I run "import kid" from any directory
other than \python24\scripts then it gets the right file, but if I do
"import kid" from my \python24\scripts directory, I get the wrong file:

c:\python24\lib\site-packages\kid-0.8-py2.4.egg\EGG-INFO\scripts\kid

Just as a test I removed kid.py in the scripts directory and the
problem went away. Kind of weird, but that's alright.

Steve

Reply all
Reply to author
Forward
0 new messages