Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Stuck in the tutorial - aspen can't find the handler "handy" :-(
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jan Winkelmann  
View profile  
 More options Jan 6, 9:17 am
From: Jan Winkelmann <subway.coo...@googlemail.com>
Date: Tue, 6 Jan 2009 06:17:08 -0800 (PST)
Local: Tues, Jan 6 2009 9:17 am
Subject: Stuck in the tutorial - aspen can't find the handler "handy" :-(
Hi everybody,

I have no idea why this doesn't work. I set up everything just like
said in the tutorial, but on starting aspen in this directory he fails
with error "ImportError: No module named handy.py [handlers.conf, line
3]". Here's the whole output: (listing 1)
 $ aspen
launching child process
starting child server
Traceback (most recent call last):
  File "/usr/local/bin/aspen", line 3, in <module>
    aspen.main()
  File "/usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
__init__.py", line 402, in main
    start_server()
  File "/usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
__init__.py", line 189, in start_server
    server = server_factory() # factored out to ease testing
  File "/usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
__init__.py", line 159, in server_factory
    website = website_factory()
  File "/usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
__init__.py", line 148, in website_factory
    configuration.load_plugins() # user modules loaded here
  File "/usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
load.py", line 182, in load_plugins
    self.handlers = self.load_handlers()
  File "/usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
load.py", line 327, in load_handlers
    obj = colon.colonize(name, fpname, lineno)
  File "/usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
colon.py", line 43, in colonize
    exec 'import %s as obj' % modname
  File "<string>", line 1, in <module>
ImportError: No module named handy.py [handlers.conf, line 3]

then he writes this (listing 2)

Exception in thread Thread-1 (most likely raised during interpreter
shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.5/threading.py", line 486, in
__bootstrap_inner
  File "/usr/lib/python2.5/threading.py", line 446, in run
  File "/usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
restarter.py", line 153, in _look_for_changes
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute
'modules'
starting child server

and starts at the "starting child server" part of fig. 1 and begins to
loop this.

===

I don't know if this helps but this simple Ctrl+L in vim didn't work
either, he just printed the python code and the HTML code on the
website. However he only starts the server if __/etc/handlers.conf
doesn't link to any handlers (i only tried it without one)

===

Here are some stats, I don't know if they help:

$ python --version
Python 2.5.2
--
$ uname -a
Linux keks-t43 2.6.25-gentoo-r7+keks-0.5 #9 SMP Sat Oct 18 03:06:37
CEST 2008 i686 Intel(R) Pentium(R) M processor 1.86GHz GenuineIntel
GNU/Linux
--

>>> import aspen

 works fine.

===

If you need any more info, feel free to ask me!

Thanks in advance, Jan


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chad Whitacre  
View profile  
 More options Jan 6, 2:30 pm
From: Chad Whitacre <c...@zetaweb.com>
Date: Tue, 06 Jan 2009 14:30:43 -0500
Local: Tues, Jan 6 2009 2:30 pm
Subject: Re: Stuck in the tutorial - aspen can't find the handler "handy" :-(
Jan,

 > on starting aspen in this directory he fails with error
 > "ImportError: No module named handy.py [handlers.conf, line 3]

Where is handy.py relative to "this directory?" It should be in
./__/lib/python.

If that's not the problem, what does your handlers.conf look like?

 > then he writes this (listing 2)

This is unrelated and harmless. Sorry for the error spam.

chad


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan Winkelmann  
View profile  
 More options Jan 31, 11:56 am
From: Jan Winkelmann <subway.coo...@googlemail.com>
Date: Sat, 31 Jan 2009 08:56:13 -0800 (PST)
Local: Sat, Jan 31 2009 11:56 am
Subject: Re: Stuck in the tutorial - aspen can't find the handler "handy" :-(
Sorry this took so long, I was busy with school and afterwards totally
forgot about it.

handy.py was in ./__/lib/python2.6. I renamed it to ./__/lib/python
and...aspen comes up - but 127.0.0.1:8080 looks like this:
--
Traceback (most recent call last):
  File "//usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
wsgiserver.py", line 625, in communicate
    req.respond()
  File "//usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
wsgiserver.py", line 357, in respond
    response = self.wsgi_app(self.environ, self.start_response)
  File "//usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
website.py", line 67, in __call__
    handler = self.get_handler(fspath)
  File "//usr/lib/python2.5/site-packages/aspen-0.8-py2.5.egg/aspen/
website.py", line 134, in get_handler
    raise HandlerError("No handler found.")
HandlerError
--
My ./__/etc/handlers.conf looks like this:
--
fnmatch aspen.rules:fnmatch

[handy:handle]
fnmatch *.asp
--
Any ideas?

Jan Winkelmann

On Jan 6, 8:30 pm, Chad Whitacre <c...@zetaweb.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google