I'm trying to set up a Pyramid starter app on a mod wsgi server. I have followed other's examples with the code below. However I'm getting the error:
LookupError: Entry point 'main' not found in egg 'Pyramid_starter'
Any advice on what I am doing wrong?
I have ran the below setup with now errors:
python setup.py develop
application.py (entry point for the mod wsgi server)
import os
import sys
from pyramid.paster import get_app
from pyramid.paster import get_appsettings
here = os.path.dirname(os.path.abspath(__file__))
project_folder = os.path.basename(here).lower()
sys.path.insert(0, os.path.join(here, project_folder))
config = os.path.join(here, 'development.ini')
!!! Both of these lines of code generate the error
application = get_app(config, 'main')
settings = get_appsettings(config, 'main')
My development.ini file:
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/environment.html
###
[app:main]
pyramid.includes = pyramid_chameleon
use = egg:Pyramid_starter
pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
# By default, the toolbar only appears for clients from IP addresses
# '127.0.0.1' and '::1'.
# debugtoolbar.hosts = 127.0.0.1 ::1
###
# wsgi server configuration
###
[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/logging.html
###
[loggers]
keys = root, pyramid_starter
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[logger_pyramid_starter]
level = DEBUG
handlers =
qualname = pyramid_starter
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
The error is in your .ini file. Change the following
[app:main]
pyramid.includes = pyramid_chameleon
use = egg:Pyramid_starter
to
[app:main]
use = egg:Pyramid_starter
pyramid.includes = pyramid_chameleon
The use = egg:Pyramid_starter comes first