paster create error for latest tg.devtools

3 views
Skip to first unread message

heretoo

unread,
Feb 6, 2009, 10:54:24 AM2/6/09
to TurboGears
Hi,

I'm getting the following error when trying the command "paster create
-t turbogears2 generator". Any ideas?

Selected and implied templates:
tg.devtools#turbogears2 TurboGears 2.0 Standard Quickstart Template

Variables:
egg: generator
package: generator
project: generator
Creating template turbogears2
Traceback (most recent call last):
File "/home/ts/virtenv/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')
()
File "/home/ts/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/command.py", line 84, in run
invoke(command, command_name, options, args[1:])
File "/home/ts/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/command.py", line 123, in invoke
exit_code = runner.run(args)
File "/home/ts/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/command.py", line 218, in run
result = self.command()
File "/home/ts/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/create_distro.py", line 137, in command
template, output_dir, vars)
File "/home/ts/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/create_distro.py", line 196, in create_template
template.run(self, output_dir, vars)
File "/home/ts/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-
py2.5.egg/paste/script/templates.py", line 57, in run
self.pre(command, output_dir, vars)
File "/home/ts/virtenv/lib/python2.5/site-packages/
tg.devtools-2.0b5.1-py2.5.egg/devtools/pastetemplate.py", line 34, in
pre
if vars['geo'] == 'True':
KeyError: 'geo'

jorge.vargas

unread,
Feb 6, 2009, 9:10:14 PM2/6/09
to turbo...@googlegroups.com, Sanjiv Singh
does it fails with "paster quickstart" the error seems to have been
introduced with http://trac.turbogears.org/ticket/1863

Sanjiv, could you take a look at this?

Straub Tristan

unread,
Feb 7, 2009, 12:44:35 AM2/7/09
to turbo...@googlegroups.com
Ok, "paster quickstart" works without any complaints. When I modified the code doing the check "if vars['geo'] == 'True':" so it wouldn't fail, then I got the error following error:


Selected and implied templates:
  tg.devtools#turbogears2  TurboGears 2.0 Standard Quickstart Template

Variables:
  egg:      generator
  package:  generator
  project:  generator
Creating template turbogears2
Creating directory ./generator
  Recursing into +package+
    Creating ./generator/generator/
    Copying __init__.py_tmpl to ./generator/generator/__init__.py
    Recursing into config
      Creating ./generator/generator/config/
      Copying __init__.py_tmpl to ./generator/generator/config/__init__.py

Traceback (most recent call last):
  File "/home/tristan/Development/tgtest/virtenv/bin/paster", line 8, in <module>

    load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')()
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/command.py", line 84, in run

    invoke(command, command_name, options, args[1:])
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/command.py", line 123, in invoke
    exit_code = runner.run(args)
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/command.py", line 218, in run
    result = self.command()
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/create_distro.py", line 137, in command
    template, output_dir, vars)
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/create_distro.py", line 196, in create_template
    template.run(self, output_dir, vars)
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/templates.py", line 58, in run
    self.write_files(command, output_dir, vars)
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/templates.py", line 127, in write_files
    template_renderer=self.template_renderer)
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/copydir.py", line 110, in copy_dir
    svn_add=svn_add, template_renderer=template_renderer)
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/copydir.py", line 110, in copy_dir
    svn_add=svn_add, template_renderer=template_renderer)
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/copydir.py", line 122, in copy_dir
    template_renderer=template_renderer)
  File "/home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg/paste/script/copydir.py", line 292, in substitute_content
    return template_renderer(content, vars, filename=filename)
  File "build/bdist.linux-x86_64/egg/tempita/__init__.py", line 306, in paste_script_template_renderer
  File "build/bdist.linux-x86_64/egg/tempita/__init__.py", line 136, in substitute
  File "build/bdist.linux-x86_64/egg/tempita/__init__.py", line 142, in _interpret
  File "build/bdist.linux-x86_64/egg/tempita/__init__.py", line 151, in _interpret_codes
  File "build/bdist.linux-x86_64/egg/tempita/__init__.py", line 168, in _interpret_code
  File "build/bdist.linux-x86_64/egg/tempita/__init__.py", line 214, in _interpret_if
  File "build/bdist.linux-x86_64/egg/tempita/__init__.py", line 222, in _eval
  File "<string>", line 1, in <module>
NameError: name 'sqlalchemy' is not defined at line 27 column 3 in file /home/tristan/Development/tgtest/virtenv/lib/python2.5/site-packages/tg.devtools-2.0b5.1-py2.5.egg/devtools/templates/turbogears/+package+/config/app_cfg.py_tmpl


2009/2/7 jorge.vargas <jorge....@gmail.com>

Sanjiv

unread,
Feb 7, 2009, 6:58:43 AM2/7/09
to TurboGears
Hi Jorge,

It appears that paster create is not supported by TG2 ATM. So it fails
even in b4 and the prior release. In case we decide to support paster
create we have to define our template variables in pastetemplate.py
too. I have opened a new ticket for this with a patch here.
http://trac.turbogears.org/ticket/2187.

regards
Sanjiv

On Feb 7, 7:10 am, "jorge.vargas" <jorge.var...@gmail.com> wrote:
> does it fails with "paster quickstart" the error seems to have been
> introduced withhttp://trac.turbogears.org/ticket/1863
>
> Sanjiv, could you take a look at this?
>

mark.mch...@gmail.com

unread,
Feb 7, 2009, 8:28:29 PM2/7/09
to TurboGears
Is there a particular reason that you want to use paster create rather
than paster quickstart?

Straub Tristan

unread,
Feb 9, 2009, 2:25:33 PM2/9/09
to turbo...@googlegroups.com
No special reason except that I seem to remember when tg2 was in alpha that "paster quickstart" wasn't supported and had switched over to paster create.....

jorge.vargas

unread,
Feb 11, 2009, 8:45:26 AM2/11/09
to turbo...@googlegroups.com
will you please test this again with trunk as per
http://trac.turbogears.org/ticket/2187

Thanks for fixing this Sanjiv :)

Straub Tristan

unread,
Feb 19, 2009, 12:35:44 PM2/19/09
to turbo...@googlegroups.com
Hi, sorry it's taken so long to reply. I've tested the trunk and it works again with "paster create -t turbogears2". Nice work Sanjiv.

Tristan

2009/2/11 jorge.vargas <jorge....@gmail.com>
Reply all
Reply to author
Forward
0 new messages