List Info

Thread: Upgrade to 2.2 - static problems




Upgrade to 2.2 - static problems
user name
2006-04-11 10:24:28
TypeError: default() takes exactly 1 argument (3 given)


That is because you have to declare default like so:

def default(self, dir, *args, **kwargs):
    ...


"default" is the function that's accessed
instead of a 404 error. So
when the static content does not exist, it's attempting to
visit your
404 page that doesn't have the correct paramaters included
in the
function declaration/

In conclusion, I've drawn that you haven't hosted the
static content
properly. It doesn't think it is where you have placed it.
Look up some
example code for 2.2 static content, and try to manipulate
it for your
situation. I've been using 2.1 so I can't help with that,
sorry.


--~--~---------~--~----~------------~-------~--~----~
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 http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

Upgrade to 2.2 - static problems
user name
2006-04-11 15:56:56
Hello,

> TypeError: default() takes exactly 1 argument (3 given)

> That is because you have to declare default like so:
> def default(self, dir, *args, **kwargs):

Ta.  I had copied the example directly from somewhere in the
docs
that doesn't have dir, *args and **kwargs.  That is all
sorted now.

> In conclusion, I've drawn that you haven't hosted the
static
> content properly. It doesn't think it is where you
have placed it. 
> Look up some example code for 2.2 static content, and
try to 
> manipulate it for your situation. 

That is precisely what I did.  I have tried every
combination going,
but none work.  I am personally convinced now that the issue
lies
with httpauthfilter as when I take that out, the static
content is
served correctly.

Thank you for your help,

Russell

The Duck Quacks:
http://www-users.
york.ac.uk/~rb502/ - Homepage
h
ttp://www-users.york.ac.uk/~rb502/blog/quack.shtml -
Blog
http://www.flic
kr.com/photos/lsnduck/ - Photos

--~--~---------~--~----~------------~-------~--~----~
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 http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

[1-2]

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