Dave Perrett

Pylons - LookupError: Entry Point 'Main' Not Found in Egg

linux, programming, python, quickie, web

If you are getting a LookupError in Pylons similar to the following :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 paster setup-app development.ini                                                                                                                          (12-22 09:21)
Traceback (most recent call last):
  File "/usr/bin/paster", line 7, in ?
    sys.exit(
  File "/usr/lib/python2.4/site-packages/PasteScript-1.7.3-py2.4.egg/paste/script/command.py", line 84, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/python2.4/site-packages/PasteScript-1.7.3-py2.4.egg/paste/script/command.py", line 123, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/python2.4/site-packages/PasteScript-1.7.3-py2.4.egg/paste/script/appinstall.py", line 68, in run
    return super(AbstractInstallCommand, self).run(new_args)
  File "/usr/lib/python2.4/site-packages/PasteScript-1.7.3-py2.4.egg/paste/script/command.py", line 218, in run
    result = self.command()
  File "/usr/lib/python2.4/site-packages/PasteScript-1.7.3-py2.4.egg/paste/script/appinstall.py", line 447, in command
    conf = appconfig(config_spec, relative_to=os.getcwd())
  File "/usr/lib/python2.4/site-packages/PasteDeploy-1.3.2-py2.4.egg/paste/deploy/loadwsgi.py", line 215, in appconfig
    global_conf=global_conf)
  File "/usr/lib/python2.4/site-packages/PasteDeploy-1.3.2-py2.4.egg/paste/deploy/loadwsgi.py", line 248, in loadcontext
    global_conf=global_conf)
  File "/usr/lib/python2.4/site-packages/PasteDeploy-1.3.2-py2.4.egg/paste/deploy/loadwsgi.py", line 278, in _loadconfig
    return loader.get_context(object_type, name, global_conf)
  File "/usr/lib/python2.4/site-packages/PasteDeploy-1.3.2-py2.4.egg/paste/deploy/loadwsgi.py", line 409, in get_context
    section)
  File "/usr/lib/python2.4/site-packages/PasteDeploy-1.3.2-py2.4.egg/paste/deploy/loadwsgi.py", line 430, in _context_from_use
    context = self.get_context(
  File "/usr/lib/python2.4/site-packages/PasteDeploy-1.3.2-py2.4.egg/paste/deploy/loadwsgi.py", line 361, in get_context
    global_conf=global_conf)
  File "/usr/lib/python2.4/site-packages/PasteDeploy-1.3.2-py2.4.egg/paste/deploy/loadwsgi.py", line 248, in loadcontext
    global_conf=global_conf)
  File "/usr/lib/python2.4/site-packages/PasteDeploy-1.3.2-py2.4.egg/paste/deploy/loadwsgi.py", line 285, in _loadegg
    return loader.get_context(object_type, name, global_conf)
  File "/usr/lib/python2.4/site-packages/PasteDeploy-1.3.2-py2.4.egg/paste/deploy/loadwsgi.py", line 560, in get_context
    entry_point, protocol, ep_name = self.find_egg_entry_point(
  File "/usr/lib/python2.4/site-packages/PasteDeploy-1.3.2-py2.4.egg/paste/deploy/loadwsgi.py", line 592, in find_egg_entry_point
    raise LookupError(
LookupError: Entry point 'main' not found in egg 'book_exchange' (dir: /home/dave/book_exchange; protocols: paste.app_factory, paste.composite_factory, paste.composit_factory; entry_points: )

… you need to set up egg_info :

1
> sudo  python setup.py egg_info

I have no idea why :)