I am currently converting a long running TG1.1 app to TG1.5 and have encountered some issues trying to deploy it. While trying to access it mounted on a subpath /afiliados, the app throws a 404 error, the following:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/CherryPy-3.2.2-py2.7.egg/cherrypy/_cprequest.py", line 628, in respond
self.get_resource(path_info)
File "/usr/local/lib/python2.7/dist-packages/CherryPy-3.2.2-py2.7.egg/cherrypy/_cprequest.py", line 744, in get_resource
dispatch(path)
File "/usr/local/lib/python2.7/dist-packages/TurboGears-1.5.1-py2.7.egg/turbogears/dispatchers.py", line 47, in __call__
raise NotFound(path_info)
NotFound: (404, "The path '/afiliados' was not found.")
Here is how the app is mounted on the apache config:
Alias /afiliados/static /home/asura/servidor/Sistemas/TurboAffiliate/turboaffiliate/static
WSGIScriptAlias /afiliados /home/asura/servidor/Sistemas/TurboAffiliate/apache/affiliate.wsgi
the full affiliate.wsgi script is this:
# -*- coding: utf-8 -*-
import sys
from os import path
program, subplace = path.split(path.dirname(__file__))
sys.path.append(program)
sys.path.append(path.join(program, 'wording'))
sys.stdout = sys.stderr
import os
locale_name = None
if os.name == 'nt':
locale_name = 'Spanish_Honduras.1252'
else:
locale_name = "es_HN.utf8"
os.environ['PYTHON_EGG_CACHE'] = program
import turbogears
import locale
locale.setlocale(locale.LC_ALL, locale_name)
turbogears.update_config(configfile="dev.cfg", modulename="turboaffiliate.config")
turbogears.config.update({'global': {'server.webpath': '/afiliados'}})
from turboaffiliate import command
print(turbogears.config.get("server.webpath"))
application = command.start()
Since its an open source app I am working on for a long time, the full source code updated to TG1.5 can be viewed here:
http://bazaar.launchpad.net/~cafg10/turboaffiliate/trunk/filesI did changed the webpath in the config files but got the same result. can someone shed some light on what is going on?