tg-admin quickstart KeyError: 304

30 views
Skip to first unread message

Edward Muller

unread,
Feb 24, 2007, 4:44:32 PM2/24/07
to turbo...@googlegroups.com
When I run tg-admin quickstart I get the following error:

Traceback (most recent call last):
File "/usr/local/bin/tg-admin", line 8, in <module>
load_entry_point('TurboGears==1.0.1', 'console_scripts', 'tg-
admin')()
File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c5-
py2.5.egg/pkg_resources.py", line 236, in load_entry_point
File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c5-
py2.5.egg/pkg_resources.py", line 2097, in load_entry_point
File "/usr/local/lib/python2.5/site-packages/setuptools-0.6c5-
py2.5.egg/pkg_resources.py", line 1830, in load
File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.1-
py2.5.egg/turbogears/__init__.py", line 6, in <module>
from turbogears.controllers import expose, flash, validate,
redirect, \
File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.1-
py2.5.egg/turbogears/controllers.py", line 12, in <module>
from turbogears import view, database, errorhandling, config
File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.1-
py2.5.egg/turbogears/view/__init__.py", line 1, in <module>
from turbogears.view.base import *
File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.1-
py2.5.egg/turbogears/view/base.py", line 17, in <module>
from turbogears.i18n import i18n_filter, get_locale
File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.1-
py2.5.egg/turbogears/i18n/__init__.py", line 5, in <module>
from turbogears.i18n.tg_gettext import gettext, ngettext,
install, is_locale_supported, \
File "/usr/local/lib/python2.5/site-packages/TurboGears-1.0.1-
py2.5.egg/turbogears/i18n/tg_gettext.py", line 4, in <module>
from turbojson.jsonify import jsonify
File "/usr/local/lib/python2.5/site-packages/TurboJson-1.0-
py2.5.egg/turbojson/jsonify.py", line 26, in <module>
'isinstance(obj, datetime.datetime) or '
File "build/bdist.macosx-10.3-i386/egg/dispatch/functions.py",
line 690, in when
File "build/bdist.macosx-10.3-i386/egg/dispatch/functions.py",
line 577, in _decorate
File "<string>", line 10, in parseRule
File "build/bdist.macosx-10.3-i386/egg/dispatch/functions.py",
line 440, in parseRule
File "build/bdist.macosx-10.3-i386/egg/dispatch/functions.py",
line 326, in parse
File "build/bdist.macosx-10.3-i386/egg/dispatch/ast_builder.py",
line 383, in parse_expr
File "build/bdist.macosx-10.3-i386/egg/dispatch/ast_builder.py",
line 378, in build
KeyError: 304

I am using python2.5 on OS X 10.4 (Tiger).


--
Edward Muller
Interlix, LLC
Owner

Zope, Plone & Zimbra Hosting

phone: +1.417.862.0573
fax: +1.770.818.5437
--


Jorge Vargas

unread,
Feb 24, 2007, 4:52:03 PM2/24/07
to turbo...@googlegroups.com

Jorge Godoy

unread,
Feb 25, 2007, 7:27:50 AM2/25/07
to turbo...@googlegroups.com
Em Sábado 24 Fevereiro 2007 19:44, Edward Muller escreveu:
> When I run tg-admin quickstart I get the following error:

How did you install your RuleDispatch package?

--
Jorge Godoy <jgo...@gmail.com>

Christopher Arndt

unread,
Mar 26, 2007, 10:50:00 AM3/26/07
to turbo...@googlegroups.com
Jorge Vargas schrieb:

> On 2/24/07, Edward Muller <edwa...@interlix.com> wrote:
>> When I run tg-admin quickstart I get the following error:
>>
>> KeyError: 304
>>
>> I am using python2.5 on OS X 10.4 (Tiger).
>
> http://docs.turbogears.org/1.0/Python2.5Support

So, is there a quick fix to get TG running under py2.5 and OS X?

I tried a current branches/1.0 checkout but that resulted in the same error.

ls -1 lib/python2.5/*.egg

Cheetah-1.0-py2.5-macosx-10.3-fat.egg
CherryPy-2.2.1-py2.5.egg
FormEncode-0.7-py2.5.egg
Paste-1.3-py2.5.egg
PasteDeploy-1.1-py2.5.egg
PasteScript-1.3-py2.5.egg
PyProtocols-1.0a0-py2.5-macosx-10.3-fat.egg
RuleDispatch-0.5a0.dev_r2115-py2.5-macosx-10.3-fat.egg
SQLObject-0.8.1-py2.5.egg
TurboCheetah-0.9.5-py2.5.egg
TurboGears.egg-link
TurboJson-1.0-py2.5.egg
TurboKid-0.9.9-py2.5.egg
configobj-4.4.0-py2.5.egg
elementtree-1.2.6_20050316-py2.5.egg
kid-0.9.5-py2.5.egg
setuptools-0.6c5-py2.5.egg

Chris

Oleg Deribas

unread,
Mar 26, 2007, 3:27:31 PM3/26/07
to TurboGears

Christopher Arndt:

> So, is there a quick fix to get TG running under py2.5 and OS X?
>
> I tried a current branches/1.0 checkout but that resulted in the same error.
>
> ls -1 lib/python2.5/*.egg

> RuleDispatch-0.5a0.dev_r2115-py2.5-macosx-10.3-fat.egg

Try to build RuleDispatch from SVN revision 2283

--
Oleg

Christopher Arndt

unread,
Mar 28, 2007, 10:30:08 AM3/28/07
to turbo...@googlegroups.com
Oleg Deribas schrieb:

> Try to build RuleDispatch from SVN revision 2283

At last, I was successful running HEAD of the TG 1.0 branch on MAC OS X with
Python 2.5.

This was a bit of an effort:

1) Install setuptools
2) sudo easy_install workingenv.py
3) workingenv tg_env
4) source tg_env/bin/activate
5) cd tg_env/src
6) svn co http://svn.turbogears.org/branches/1.0 turbogears
7) cd turbogears
8) python setup.py develop; cd ..
9) Get RuleDispatch > r2283:

Unfortunately

svn co http://svn.eby-sarna.com/svnroot/RuleDispatch

always gives me the following error:

svn: PROPFIND request failed on '/'
svn: PROPFIND of '/': 200 OK (http://svn.eby-sarna.com)

I can browse the repository through ViewCVS (http://svn.eby-sarna.com/) but I
cant't do a checkout :-( So I downloaded a tarball through the ViewCVS interface:

wget -O RuleDispatch.tar.gz \
http://svn.eby-sarna.com/RuleDispatch.tar.gz?view=tar

and then

tar xzf RuleDispatch.tar.gz; cd RuleDispatch
python setup.py build && easy_install . && cd ..

10) easy_install DecoratorTools (required by RuleDispatch)
11) easy_install -UZ SQLObject Cheetah

This is to upgrade Cheetah to 2.0rc7 (Cheetah 1.0 has a Python 2.5 syntax
error) and install SQLObject - why wasn't that installed in step 8 and why does
'tg-admin quickstart' require it, even if I don't want identity?

Now 'echo n | tg-admin -p mytest MyTest' succeeds, and a quick test with

cd MyTest; ./start-mytest.py

provides a working welcome page at http://localhost:8080 !


Chris

Reply all
Reply to author
Forward
0 new messages