Andrei, thanks for but here's the weird part. It's intermittent. If I
were missing the $def (and actually intending to pass a variable in to
the template), I would get the error every time, but I'm getting it
intermittently.

I have two web.py sites on this server. I never noticed this issue
before uploading the second site, so something between the two
instances isn't playing well.

Basically, one of the sites has an index.html template that DOES take
a single name variable. The other site also has index.html template,
but it DOES NOT take any variables. Both sites work 99% of the time,
but on occasion it seems like Site A is actually getting the template
from Site B, and vice versa -- and that's what throws the error.
Completely strange.

Any advice on setting up multiple web.py sites on one server? Is there
a canonical way to do this?

Has anyone seen an issue like this before? It seems like it gets worse
as time since an apache restart increases, so is it possibly a caching
issue? Could the processes somehow be mingling variables? After
exhaustive googling the closest thing I could find is this thread,
which didn't have enough detail to help resolve the issue: http://goo.gl/5QxVj

Sites are running on an EC2 instance, on Apache, calling web.py
through mod_wsgi.

Thanks again,
Eric

On Apr 2, 3:37 am, andrei <[email protected]> wrote:
> Looks like your "index" template doesn't have "$def with (name)"
> declaration in it, as you're trying to pass "name" variable calling
> "render.index(name)" and it says the template takes no arguments.
>
> On Apr 1, 10:32 pm, Eric Mika <[email protected]> wrote:
>
>
>
> > Hi everyone, I'm seeing these errors showing up in the logs. My site
> > responds to 99% of requests correctly, but every once in a while it
> > throws this error. (And it's always this error.)
>
> > Traceback (most recent call last):, referer:http://www.example.com
> >   File "/var/www/html/example/web/application.py", line 242, in
> > process, referer:http://www.example.com
> >     return self.handle(), referer:http://www.example.com
> >   File "/var/www/html/example/web/application.py", line 233, in
> > handle, referer:http://www.example.com
> >     return self._delegate(fn, self.fvars, args), 
> > referer:http://www.example.com
> >   File "/var/www/html/example/web/application.py", line 415, in
> > _delegate, referer:http://www.example.com
> >     return handle_class(cls), referer:http://www.example.com
> >   File "/var/www/html/example/web/application.py", line 390, in
> > handle_class, referer:http://www.example.com
> >     return tocall(*args), referer:http://www.example.com
> >   File "/var/www/html/example/example.py", line 55, in GET, 
> > referer:http://www.example.com
> >     return render.index(name), referer:http://www.example.com
> >   File "/var/www/html/example/web/template.py", line 898, in __call__,
> > referer:http://www.example.com
> >     return BaseTemplate.__call__(self, *a, **kw), 
> > referer:http://www.example.com
> >   File "/var/www/html/example/web/template.py", line 804, in __call__,
> > referer:http://www.example.com
> >     return self.t(*a, **kw), referer:http://www.example.com
> > TypeError: __template__() takes no arguments (1 given), 
> > referer:http://www.example.com
> > , referer:http://www.example.com
>
> > Any ideas? All the other posts on the "__template__() takes no
> > arguments" error are for cases when it's a complete / blocking bug...
> > not something intermittent. Thanks in advance for your help.
>
> > Best,
> > Eric

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to