Unable to create a new project in pylons

3 views
Skip to first unread message

kumar

unread,
Oct 4, 2009, 10:58:13 PM10/4/09
to pylons-discuss
Hi Everyone I am trying to create a new project by using pylons
template but i am getting this error. I pasted the snippet below.

Can any one pls help me.

$ paster create --template=pylons nav
Selected and implied templates:
Pylons#pylons Pylons application template

Variables:
egg: nav
package: nav
project: nav
Enter template_engine (mako/genshi/jinja/etc: Template language)
['mako']:
Enter sqlalchemy (True/False: Include SQLAlchemy 0.4 configuration)
[False]: true
Enter google_app_engine (True/False: Setup default appropriate for
Google App Engine) [False]: false
Creating template pylons
Traceback (most recent call last):
File "/usr/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')
()
File "/usr/lib/python2.5/site-packages/paste/script/command.py",
line 79, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/python2.5/site-packages/paste/script/command.py",
line 118, in invoke
exit_code = runner.run(args)
File "/usr/lib/python2.5/site-packages/paste/script/command.py",
line 213, in run
result = self.command()
File "/usr/lib/python2.5/site-packages/paste/script/
create_distro.py", line 137, in command
template, output_dir, vars)
File "/usr/lib/python2.5/site-packages/paste/script/
create_distro.py", line 196, in create_template
template.run(self, output_dir, vars)
File "/usr/lib/python2.5/site-packages/paste/script/templates.py",
line 57, in run
self.write_files(command, output_dir, vars)
File "/usr/lib/python2.5/site-packages/paste/script/templates.py",
line 111, in write_files
template_dir = self.template_dir()
File "/usr/lib/python2.5/site-packages/paste/script/templates.py",
line 53, in template_dir
return os.path.join(self.module_dir(), self._template_dir)
File "/usr/lib/python2.5/posixpath.py", line 60, in join
if b.startswith('/'):
AttributeError: 'tuple' object has no attribute 'startswith'

Waiting for any reply.

Thanks

Mike Orr

unread,
Oct 4, 2009, 11:27:53 PM10/4/09
to pylons-...@googlegroups.com

That's weird. Can you try a different application name and see if
that works? Paster sometimes has trouble with certain names, although
the only name I've had problems with is "test".

--
Mike Orr <slugg...@gmail.com>

kumar

unread,
Oct 4, 2009, 11:29:29 PM10/4/09
to pylons-discuss
Thanks

kumar

unread,
Oct 4, 2009, 11:30:59 PM10/4/09
to pylons-discuss
Thank you very much for your response we tried with some other name
but still we are getting this issue please help.

On Oct 4, 8:27 pm, Mike Orr <sluggos...@gmail.com> wrote:
> Mike Orr <sluggos...@gmail.com>

Mike Orr

unread,
Oct 4, 2009, 11:41:06 PM10/4/09
to pylons-...@googlegroups.com
On Sun, Oct 4, 2009 at 8:30 PM, kumar <naveen.n...@gmail.com> wrote:
>
> Thank you very much for your response we tried with some other name
> but still we are getting this issue please help.

Oh, it's asking the App Engine question. This is another indication
that your Pylons is slightly old.

I have no idea how a tuple got substituted for a path string, but it
suggests your copy of Pylons or Paste might be corrupted. If you're
comfortable with the Python debugger you can run "python -m pdb `which
paster` create --template=pylons nav" and see what the value of 'b'
is. That might give us a clue what's wrong.

But it's probably easier to install a fresh copy of Pylons 0.9.7 in
another virtualenv and see if the problem goes away.

--
Mike Orr <slugg...@gmail.com>

Arun Tomar

unread,
Oct 4, 2009, 11:41:08 PM10/4/09
to pylons-...@googlegroups.com
hi!

well i don't know what's exactly wrong, but i've another suggestion.
create a virtualenv and install pylons and sqlalchemy in that. then try
to create pylons app and check if you get the same error.

also it would be helpful if you could let ppl know which OS you are
using and version etc. in order to replicate or reproduce the bug.

regds,
arun.


kumar

unread,
Oct 5, 2009, 12:01:54 AM10/5/09
to pylons-discuss
Thank you very much for your reply. This is the os below. Pylons
version is 0.9.7.

Linux pipeline3.acel.sdsu.edu 2.6.27.25-78.2.56.fc9.i686 #1 SMP Thu
Jun 18 12:47:50 EDT 2009 i686 i686 i386 GNU/Linux.

Sudhir Bala

unread,
Oct 5, 2009, 12:02:22 AM10/5/09
to pylons-...@googlegroups.com
-bash-3.2$ python -m pdb /usr/bin/paster create --template=pylons nav
> /usr/bin/paster(3)<module>()
-> __requires__ = 'PasteScript==1.7.3'
(Pdb) cont

Selected and implied templates:
  Pylons#pylons  Pylons application template

Variables:
  egg:      nav
  package:  nav
  project:  nav
Enter template_engine (mako/genshi/jinja/etc: Template language) ['mako']:
Enter sqlalchemy (True/False: Include SQLAlchemy 0.4 configuration) [False]: True

Enter google_app_engine (True/False: Setup default appropriate for Google App Engine) [False]:
Creating template pylons
Traceback (most recent call last):
  File "/usr/lib/python2.5/pdb.py", line 1213, in main
    pdb._runscript(mainpyfile)
  File "/usr/lib/python2.5/pdb.py", line 1138, in _runscript
    self.run(statement, globals=globals_, locals=locals_)
  File "/usr/lib/python2.5/bdb.py", line 366, in run
    exec cmd in globals, locals
  File "<string>", line 1, in <module>

  File "/usr/bin/paster", line 8, in <module>
    load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')()
  File "/usr/lib/python2.5/site-packages/paste/script/command.py", line 79, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/python2.5/site-packages/paste/script/command.py", line 118, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/python2.5/site-packages/paste/script/command.py", line 213, in run
    result = self.command()
  File "/usr/lib/python2.5/site-packages/paste/script/create_distro.py", line 137, in command
    template, output_dir, vars)
  File "/usr/lib/python2.5/site-packages/paste/script/create_distro.py", line 196, in create_template

    template.run(self, output_dir, vars)
  File "/usr/lib/python2.5/site-packages/paste/script/templates.py", line 57, in run
    self.write_files(command, output_dir, vars)
  File "/usr/lib/python2.5/site-packages/paste/script/templates.py", line 111, in write_files
    template_dir = self.template_dir()
  File "/usr/lib/python2.5/site-packages/paste/script/templates.py", line 53, in template_dir
    return os.path.join(self.module_dir(), self._template_dir)
  File "/usr/lib/python2.5/posixpath.py", line 60, in join
    if b.startswith('/'):
AttributeError: 'tuple' object has no attribute 'startswith'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /usr/lib/python2.5/posixpath.py(60)join()
-> if b.startswith('/'):
(Pdb) step
Post mortem debugger finished. The /usr/bin/paster will be restarted

Sudhir Bala

unread,
Oct 5, 2009, 12:04:10 AM10/5/09
to pylons-...@googlegroups.com
-bash-3.2$ /usr/bin/paster --version
PasteScript 1.7.3 from /usr/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg (python 2.5.1 (r251:54863, Jun 15 2008, 18:24:51))
-bash-3.2$


On Sun, Oct 4, 2009 at 8:41 PM, Mike Orr <slugg...@gmail.com> wrote:

Sreejith K

unread,
Oct 12, 2009, 6:27:43 AM10/12/09
to pylons-discuss
I also got the same error. The output of Pdb is

...........
............
File "/usr/lib64/python2.5/posixpath.py", line 60, in join
if b.startswith('/'):
AttributeError: 'tuple' object has no attribute 'startswith'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /usr/lib64/python2.5/posixpath.py(60)join()
-> if b.startswith('/'):
(Pdb) print b
('pylons', 'templates/default_project')

b is a tuple ('pylons', 'templates/default_project')
Any idea ??

On Oct 5, 9:04 am, Sudhir Bala <sudhirb...@gmail.com> wrote:
> -bash-3.2$ /usr/bin/paster --version
> PasteScript 1.7.3 from
> /usr/lib/python2.5/site-packages/PasteScript-1.7.3-py2.5.egg (python 2.5.1
> (r251:54863, Jun 15 2008, 18:24:51))
> -bash-3.2$
>
> On Sun, Oct 4, 2009 at 8:41 PM, Mike Orr <sluggos...@gmail.com> wrote:
>
> > On Sun, Oct 4, 2009 at 8:30 PM, kumar <naveen.nandip...@gmail.com> wrote:
>
> > > Thank you very much for your response we tried with some other name
> > > but still we are getting this issue please help.
>
> > Oh, it's asking the App Engine question.  This is another indication
> > that your Pylons is slightly old.
>
> > I have no idea how a tuple got substituted for a path string, but it
> > suggests your copy of Pylons or Paste might be corrupted.  If you're
> > comfortable with the Python debugger you can run "python -m pdb `which
> > paster` create --template=pylons nav" and see what the value of 'b'
> > is.  That might give us a clue what's wrong.
>
> > But it's probably easier to install a fresh copy of Pylons 0.9.7 in
> > another virtualenv and see if the problem goes away.
>
> > --
> > Mike Orr <sluggos...@gmail.com>
>
>

Sreejith K

unread,
Oct 13, 2009, 5:18:24 AM10/13/09
to pylons-discuss
Is there any solution for this issue ?

Doug Latornell

unread,
Nov 6, 2009, 8:07:46 PM11/6/09
to pylons-discuss
I just ran into this issue while trying to create a new Pylons project
to work through the SimpleSite tutorial from the Pylons book. The
traceback showed that the error was coming from a version of paste in /
usr/local/lib/python2.5/site-packages/paste/script/templates.py event
though I had just done a fresh install of Pylons in a virtualenv.

Starting over again with a virtualenv --no-site-packages solved the
problem for me. Obviously I was picking up an older version of paste
that is installed in the system-wide site packages.

This was on OpenBSD 4.4 with Python 2.5.2.
Reply all
Reply to author
Forward
0 new messages