List Info

Thread: Hello world on website under 3.1b2




Hello world on website under 3.1b2
user name
2007-12-19 11:14:24
I am trying to get the "Hello World" example
working with the 3.1 beta code.

The reason I am going with beta code is that I am failing to
get both Digest
Authentication and sessions working on the 3.0.2 stable
code.  The 3.0.2
release gives an error that says:

------------------------------------------
500 Internal Server Error

The server encountered an unexpected condition which
prevented it from fulfilling the request.

Traceback (most recent call last):
  File
"/usr/lib/python2.4/site-packages/cherrypy/_cprequest.p
y", line 556, in respond
    self.hooks.run('before_finalize')
  File
"/usr/lib/python2.4/site-packages/cherrypy/_cprequest.p
y", line 90, in run
    hook()
  File
"/usr/lib/python2.4/site-packages/cherrypy/_cprequest.p
y", line 58, in __call__
    return self.callback(**self.kwargs)
  File
"/usr/lib/python2.4/site-packages/cherrypy/lib/sessions
.py", line 412, in save
    cherrypy.session.save()
AttributeError: 'module' object has no attribute 'session'

Powered by CherryPy 3.0.2 
------------------------------------------

I get the after hitting it with a client browser (not on
start up of the server in other words).
Does anybody have the session patch that worked against
3.0.1 working against 3.0.2?

Here is the snipit of code that I am starting out with for
getting up to
speed on the 3.1 beta branch:

import cherrypy

class HelloWorld(object):
    def index(self):
        return "Hello World!"
    index.exposed = True

cherrypy.quickstart(HelloWorld())


I think the 3.1 beta code requires a config and a directive
to allow it to
listen on a port, but I can't find a good short example to
use as my
starting point.

Thanks,
Kelly


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Hello world on website under 3.1b2
user name
2007-12-19 12:06:31
Your 3.1b code works fine for me. What problem are you having?

(I'm also using 3.1b since that's what "easy_install cherrypy" gives me)

scott

On Dec 19, 2007 12:14 PM, Kelly Black < kelly.blackpenguinpackets.com">kelly.blackpenguinpackets.com&gt; wrote:

I am trying to get the "Hello World"; example working with the 3.1 beta code.

The reason I am going with beta code is that I am failing to get both Digest
Authentication and sessions working on the 3.0.2 stable code.  The 3.0.2
release gives an error that says:

------------------------------------------
500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
 File "/usr/lib/python2.4/site-packages/cherrypy/_cprequest.py&quot;, line 556, in respond
   self.hooks.run('before_finalize&#39;)
 File "/usr/lib/python2.4/site-packages/cherrypy/_cprequest.py&quot;, line 90, in run
   hook()
 File "/usr/lib/python2.4/site-packages/cherrypy/_cprequest.py&quot;, line 58, in __call__
   return self.callback(**self.kwargs)
 File "/usr/lib/python2.4/site-packages/cherrypy/lib/sessions.py&quot;, line 412, in save
   cherrypy.session.save()
AttributeError: 'module' object has no attribute 'session'

Powered by CherryPy 3.0.2
------------------------------------------

I get the after hitting it with a client browser (not on start up of the server in other words).
Does anybody have the session patch that worked against 3.0.1 working against 3.0.2?

Here is the snipit of code that I am starting out with for getting up to
speed on the 3.1 beta branch:

import cherrypy

class HelloWorld(object):
   def index(self):
       return "Hello World!&quot;
   index.exposed = True

cherrypy.quickstart(HelloWorld())


I think the 3.1 beta code requires a config and a directive to allow it to
listen on a port, but I can't find a good short example to use as my
starting point.

Thanks,
Kelly

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users&quot; group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Hello world on website under 3.1b2
user name
2007-12-19 12:07:33
On Wed, Dec 19, 2007 at 11:14:24AM -0600, Kelly Black
wrote:
> AttributeError: 'module' object has no attribute
'session'

Ok, bad form, but I am replying to my own post so I can find
this
later....

I simply replaced the sessions.py in the 3.0.2 code with the
one
in the ticket here and all is well again with the 3.0.2
release code

http://cherrypy.or
g/changeset/1707

Sorry about the noise.

Kelly


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Hello world on website under 3.1b2
user name
2007-12-19 12:11:29
I am running the server on a different machine and could not
get a connection
when I was not on localhost.  I think the config needs more
when one is not working
on localhost.

Thanks,
Kelly

On Wed, Dec 19, 2007 at 12:06:31PM -0600, Scott Graham
wrote:
> Your 3.1b code works fine for me. What problem are you
having?
> 
> (I'm also using 3.1b since that's what
"easy_install cherrypy" gives me)
> 
> scott

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )