erreur cherrypy creation session
bonjour
merci pour vos réponses
je lance la commande
python file2.py en ligne de commande
j'obtiens ceci
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| python file2.py
[17/Feb/2011:09:28:26] HTTP Serving HTTP on http://127.0.0.1:7777/
CherryPy Checker:
dir is a relative path and no root provided.
section: [/annexes]
root: None
dir: 'annexes'
^C[17/Feb/2011:09:28:39] ENGINE <Ctrl-C> hit: shutting down app engine
[17/Feb/2011:09:28:39] HTTP HTTP Server shut down
[17/Feb/2011:09:28:39] ENGINE CherryPy shut down
grossab:/var/www# |
dans mon fichier tutoriel.conf j'ai ceci
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| [global]
server.socket_host = "127.0.0.1"
server.socket_port = 7777
server.thread_pool = 5
tools.sessions.on = True
tools.sessions.storage_type = "file"
tools.sessions.storage_path = "/var/www"
tools.sessions.timeout = 60
tools.encode.encoding = "Utf-8"
[/annexes]
tools.staticdir.on = True
tools.staticdir.dir = "annexes" |
quand je demande la page 127.0.0.7777
j'obtiens ceci
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
Traceback (most recent call last):
File "/var/lib/python-support/python2.5/cherrypy/_cprequest.py", line 551, in respond
cherrypy.response.body = self.handler()
File "/var/lib/python-support/python2.5/cherrypy/_cpdispatch.py", line 24, in __call__
return self.callable(*self.args, **self.kwargs)
File "file2.py", line 289, in index
horizontal =cherrypy.session["horizontal"]
File "/var/lib/python-support/python2.5/cherrypy/__init__.py", line 257, in __getitem__
return child[key]
File "/var/lib/python-support/python2.5/cherrypy/lib/sessions.py", line 146, in __getitem__
return self._data[key]
KeyError: 'horizontal'
Powered by CherryPy 3.0.2 |
Le probleme semble venir du fait que les fichiers de sessions ne sont pas crées dans le repertoire /var/www
Entre le moment ou cela fonctionnait et le moment ou cela ne marchait plus, rien n'a été modifié j'ai rebooté
je ne sais pas quoi faire !!
merci pour votre aide
cordialement