RuntimeError: maximum recursion depth exceeded while calling a Python object
Posted
by
Bilal Basharat
on Stack Overflow
See other posts from Stack Overflow
or by Bilal Basharat
Published on 2010-12-28T14:20:23Z
Indexed on
2010/12/31
12:54 UTC
Read the original article
Hit count: 872
this error arises when i try to run the following test case which is written in models.py of my django app named 'administration' :
from django.test import Client, TestCase
from django.core import mail
class ClientTest( TestCase ):
fixtures = [ 'testdata.json' ]
def test_get_register( self ):
response = self.client.get( '/accounts/register/', {} )
self.assertEqual( response.status_code, 200 )
the error arises at this line specifically:
response = self.client.get( '/accounts/register/', {} )
my django version is 1.2.1 and python 2.6 and satchmo version is 0.9.2-pre hg-unknown. I code in windows platform(xp sp2). The command to run test case is:
python manage.py test administration
the complete error log is as follow:
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 121, in by_host
site = by_host(host=host[4:], id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 124, in by_host
site = by_host(host = 'www.%s' % host, id_only=id_only)
File "build\bdist.win32\egg\threaded_multihost\sites.py", line 101, in by_host
site = Site.objects.get(domain=host)
File "C:\django\django\db\models\manager.py", line 132, in get
return self.get_query_set().get(*args, **kwargs)
File "C:\django\django\db\models\query.py", line 336, in get
num = len(clone)
File "C:\django\django\db\models\query.py", line 81, in __len__
self._result_cache = list(self.iterator())
File "C:\django\django\db\models\query.py", line 269, in iterator
for row in compiler.results_iter():
File "C:\django\django\db\models\sql\compiler.py", line 672, in results_iter
for rows in self.execute_sql(MULTI):
File "C:\django\django\db\models\sql\compiler.py", line 717, in execute_sql
sql, params = self.as_sql()
File "C:\django\django\db\models\sql\compiler.py", line 65, in as_sql
where, w_params = self.query.where.as_sql(qn=qn, connection=self.connection)
File "C:\django\django\db\models\sql\where.py", line 91, in as_sql
sql, params = child.as_sql(qn=qn, connection=connection)
File "C:\django\django\db\models\sql\where.py", line 94, in as_sql
sql, params = self.make_atom(child, qn, connection)
File "C:\django\django\db\models\sql\where.py", line 141, in make_atom
lvalue, params = lvalue.process(lookup_type, params_or_value, connection)
File "C:\django\django\db\models\sql\where.py", line 312, in process
connection=connection, prepared=True)
File "C:\django\django\db\models\fields\subclassing.py", line 53, in inner
return func(*args, **kwargs)
File "C:\django\django\db\models\fields\subclassing.py", line 53, in inner
return func(*args, **kwargs)
File "C:\django\django\db\models\fields\__init__.py", line 323, in get_db_prep
_lookup
return [self.get_db_prep_value(value, connection=connection, prepared=prepar
ed)]
File "C:\django\django\db\models\fields\subclassing.py", line 53, in inner
return func(*args, **kwargs)
File "C:\django\django\db\models\fields\subclassing.py", line 53, in inner
return func(*args, **kwargs)
RuntimeError: maximum recursion depth exceeded while calling a Python object
----------------------------------------------------------------------
Ran 7 tests in 48.453s
FAILED (errors=1)
Destroying test database 'default'...
© Stack Overflow or respective owner