|
List Info
Thread: Configuration problems
|
|
| Configuration problems |
  United States |
2007-05-28 11:44:56 |
Hi, I'm new to CherryPy. I had it running with mod_python
until I
wanted to
attach it to a config file throught the method:
cherrypy.tree.mount(PageManager(),"/tests",'test.c
onf')
It's just not possible to get CherryPy running with the
config
parameter. (Even with an empty config file, so it's probably
not due
to syntax problems). I keep getting the unrecoverable
error.
Without it things work perfect. I can't find out what I'm
doing wrong.
Any help very much appreciated.
Here's my code:
def setup_server():
cherrypy.engine.SIGHUP = None
cherrypy.engine.SIGTERM = None
#cherrypy.tree.mount(PageManager(),"/tests")
cherrypy.tree.mount(PageManager(),"/tests",'test.
conf')
cherrypy.config.update({'environment': 'production',
'log.screen': False,
'show_tracebacks': False})
cherrypy.engine.start(blocking=False)
And config:
[/]
tools.staticdir.root =
"c:/ms4w/Apache/htdocs/tests"
[/css]
tools.staticdir.on = True
tools.staticdir.dir = "css"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Configuration problems |
  United States |
2007-05-28 12:24:32 |
Sorry for redundant mails but I tried adding the info
through a
dictionary with the same result: unconverable error. I've
taken the
example off the CherryPy doc page.
config = {'/css/style.css' : {'tools.staticfile.on': True,
'tools.staticfile.filename': os.path.join(os.getcwd(),
'data',
'css', 'style.css')}}
Gives me the same unrecoverable error.
On 28 mai, 18:44, antfar <anthony.k.farr... gmail.com> wrote:
> Hi, I'm new to CherryPy. I had it running with
mod_python until I
> wanted to
> attach it to a config file throught the method:
>
>
cherrypy.tree.mount(PageManager(),"/tests",'test.c
onf')
>
> It's just not possible to get CherryPy running with the
config
> parameter. (Even with an empty config file, so it's
probably not due
> to syntax problems). I keep getting the unrecoverable
error.
>
> Without it things work perfect. I can't find out what
I'm doing wrong.
> Any help very much appreciated.
>
> Here's my code:
>
> def setup_server():
> cherrypy.engine.SIGHUP = None
> cherrypy.engine.SIGTERM = None
>
#cherrypy.tree.mount(PageManager(),"/tests")
>
cherrypy.tree.mount(PageManager(),"/tests",'test.c
onf')
> cherrypy.config.update({'environment':
'production',
> 'log.screen': False,
> 'show_tracebacks': False})
> cherrypy.engine.start(blocking=False)
>
> And config:
>
> [/]
> tools.staticdir.root =
"c:/ms4w/Apache/htdocs/tests"
>
> [/css]
> tools.staticdir.on = True
> tools.staticdir.dir = "css"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Configuration problems |
  United States |
2007-05-28 12:28:14 |
antfar wrote:
> It's just not possible to get CherryPy running
> with the config parameter. (Even with an empty
> config file, so it's probably not due to syntax
> problems). I keep getting the unrecoverable error.
First, let's get something more useful than the
"unrecoverable" error. I recommend you move the
config.update line before the mount call and add:
'log.error_file': r'c:ms4wsite.log'
>
cherrypy.tree.mount(PageManager(),"/tests",'test.c
onf')
My first guess is that the relative filename you've
provided is not being resolved correctly (but the
site.log above should verify that or not). Try using
an absolute path for the filename
(e.g. r"c:ms4wtest.conf").
Robert Brewer
System Architect
Amor Ministries
fumanchu amor.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
|
| Re: Configuration problems |
  United States |
2007-05-28 13:00:12 |
Hi Robert,
Really sorry for the newbie incompetence. I could have sworn
I tried
absolute paths!
You just never try enough, I suppose.
Anyway, many thanks!
Anthony
On 28 mai, 19:28, "Robert Brewer" <fuman... amor.org> wrote:
> antfar wrote:
> > It's just not possible to get CherryPy running
> > with the config parameter. (Even with an empty
> > config file, so it's probably not due to syntax
> > problems). I keep getting the unrecoverable
error.
>
> First, let's get something more useful than the
> "unrecoverable" error. I recommend you move
the
> config.update line before the mount call and add:
>
> 'log.error_file': r'c:ms4wsite.log'
>
> >
cherrypy.tree.mount(PageManager(),"/tests",'test.c
onf')
>
> My first guess is that the relative filename you've
> provided is not being resolved correctly (but the
> site.log above should verify that or not). Try using
> an absolute path for the filename
> (e.g. r"c:ms4wtest.conf").
>
> Robert Brewer
> System Architect
> Amor Ministries
> fuman... amor.org
>
> winmail.dat
> 4KTélécharger
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
[1-4]
|
|