It might help to include a slice of your urls.py for the
statement(s) surrounding line 339. And perhaps signatures of
called code.
There are a couple possibilities that occur to me, but without
seeing the code, it's hard to tell. Functions/methods can
certainly take more than 255 parameters, though it may have to be
done through *args/**kwargs format; or the parsing regexp may be
phenomenally complex.
-tim
It seems you exceeded a Python limit on the number of parameters passed to a function.
I cannot find anything in the Python's documentation on such limit (any hints would be appreciated),
but a look at Python's source code shows that this error is raised in a function which parses
parameters list (Python/ast.c, line 1847, in r60723)
So, what are your solutions ?
Try to refactor your urls (more than 255 urls patterns is quite a lot IMHO), or split the call to
the "patterns" function into several calls, like this :
urlpatterns = patterns('',
...
)
urlpatterns += patterns('',
...
)
- Jonathan
Yeah, you have to use *args/**kwargs, otherwise you can't pass more
than 255 arguments.
Not that I've ever tried and run into this and then double-checked it
in Python's source or anything... ;)
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."
It's a limit hard-coded into Python itself. Sounds like you need to
modularize your URLs a bit...
There's got to be a way to build some regexs and views to deal with
those pages in a little more dynamic way.
Then again, without seeing any of it, it could be totally cool. /me shrugs
/alex
Yes. This sort of thing is what mechanisms like include() are for.
You have over 255 URLs which don't offer any logical way to break them up?
You know, if you've got a bunch of pages with different text, you can
use a database to store the text and then only use a few URL patterns
to represent all of them... do you think that, for example,
ljworld.com has one URL pattern per story?
But then you'd just write a dispatcher, surely!
--
Brett Parker