Pylons helloworld - "Expected version spec in..." error

2.8k views Asked by At

I'm trying to start new project using this doc: http://pylonshq.com/docs/en/1.0/gettingstarted/ (download go-pylons, make virtualenv with it, etc).

But when I'm trying to start helloworld app it says:

$ paster serve --reload development.ini 
Starting subprocess with file monitor
Traceback (most recent call last):
  File "/home/users/vrusinov/workspace/mydevenv/bin/paster", line 8, in <module>
    load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')()
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 84, in run
    invoke(command, command_name, options, args[1:])
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 123, in invoke
    exit_code = runner.run(args)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/command.py", line 218, in run
    result = self.command()
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py", line 276, in command
    relative_to=base, global_conf=vars)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteScript-1.7.3-py2.6.egg/paste/script/serve.py", line 313, in loadapp
    **kw)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 203, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 223, in loadobj
    global_conf=global_conf)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadcontext
    global_conf=global_conf)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 270, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 401, in get_context
    section)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 423, in _context_from_use
    object_type, name=use, global_conf=global_conf)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 353, in get_context
    global_conf=global_conf)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadcontext
    global_conf=global_conf)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 277, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 553, in get_context
    object_type, name=name)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/PasteDeploy-1.3.4-py2.6.egg/paste/deploy/loadwsgi.py", line 573, in find_egg_entry_point
    pkg_resources.require(self.spec)
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 666, in require
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 546, in resolve
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 2436, in parse_requirements
  File "/home/users/vrusinov/workspace/mydevenv/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 2404, in scan_list
ValueError: ('Expected version spec in', 'srvbakweb/', 'at', '/')

What might be the reason? How to debug this?

I'm using python 2.6 on gentoo linux. I've also tried with --no-site-packages switch for go-pylons and system-wide Pylons install. Same error :(

2

There are 2 answers

0
rvs On BEST ANSWER

After an hour of debugging (setuptools is quite complicated and not self-documenting tool) I've found the reason of this exception: I've used "paster create -t pylons myappname/". Last / caused this exception.

0
jorgelg On

I ran into a similar error when starting my server as I was following the Pylons book. Turns out that I also had made an error in my path when creating my project.

I believe I ran create -t pylons ~/dev/python/HelloWorld and that resulted in an error (possibly because of the tilde, ~).

I instead used the activate script from virtualenv (see the Pylons book for reference) and from ~/dev/python ran create -t pylons HelloWorld, which fixed the problem.