On 2/26/07, Puck <[EMAIL PROTECTED]> wrote:
>
> Hi *,
>
> I'm experiencing a strange problem:
> When autoreload.on is set to True, my app works fine. As soon as I set
> it to False, the application starts up, but an exception
> (AssertionError: This transaction has already gone through ROLLBACK;
> begin another transaction) is thrown on every single call. For the
> typical stacktrace see below.
> The utils module, which provides methods for all controllers is always
> the source of the error. All controller methods that actually return a
> dict to the template use the utils module to provide standard entries
> to the dict, i.e. a localized menu structure, etc. :
>     @expose(template="sometemplate")
>     def some_method(self):
>         content = self.get_some_specific_content()
>         return self.utils.default_dict(some_special_extra=content)
>
> Within the default_dict method, the best available locale for the user
> is calculated and loaded from db.
> The line that bombs is a debug logging statement which outputs the iso
> code of the loaded locale.
>
> Has anyone experienced similar problems?
> Any ideas as to why this is happening?
>
check out a similar thread with the name of the error your getting, it
seems that your SO objects are leaving longer then expected and that
is causing troubles.

Also remember that http request/responses and therefore CP/TG
request/responses are supposed to be atomic so this is a chance your
using a "dead" object.

can you add ?debug=1 to your dburi, that way you can see the SQL and
see when it is actually making the bad request and it could be track
to where the sql was generated.

> I'm using TG 1.0.1 and Postgres 8.2.
>
> Regards,
>   Puck
>
>
> Traceback (most recent call last):
>   File "c:\programme\python243\lib\site-packages\CherryPy-2.2.1-
> py2.4.egg\cherrypy\_cphttptools.py", line 105, in _run
>     self.main()
>   File "c:\programme\python243\lib\site-packages\CherryPy-2.2.1-
> py2.4.egg\cherrypy\_cphttptools.py", line 254, in main
>     body = page_handler(*virtual_path, **self.params)
>   File "<string>", line 3, in index
>   File "c:\programme\python243\lib\site-packages\TurboGears-1.0.1-
> py2.4.egg\turbogears\controllers.py", line 334, in expose
>     output = database.run_with_transaction(
>   File "<string>", line 5, in run_with_transaction
>   File "c:\programme\python243\lib\site-packages\TurboGears-1.0.1-
> py2.4.egg\turbogears\database.py", line 302, in so_rwt
>     retval = func(*args, **kw)
>   File "<string>", line 5, in _expose
>   File "c:\programme\python243\lib\site-packages\TurboGears-1.0.1-
> py2.4.egg\turbogears\controllers.py", line 351, in <lambda>
>     mapping, fragment, args, kw)))
>   File "c:\programme\python243\lib\site-packages\TurboGears-1.0.1-
> py2.4.egg\turbogears\controllers.py", line 378, in _execute_func
>     output = errorhandling.try_call(func, *args, **kw)
>   File "c:\programme\python243\lib\site-packages\TurboGears-1.0.1-
> py2.4.egg\turbogears\errorhandling.py", line 73, in try_call
>     return func(self, *args, **kw)
>   File "C:\Programme\eclipse3.2\workspace\myapp\myapp\controllers.py",
> line 39, in index
>     return self.utils.default_dict()
>   File "C:\Programme\eclipse3.2\workspace\myapp\myapp\utils.py", line
> 202, in default_dict
>     loc = get_user_locale()
>   File "C:\Programme\eclipse3.2\workspace\myapp\myapp\utils.py", line
> 156, in get_user_locale
>     log.debug("Best locale for " + search_locale + ": " + retval.code)
>   File "<string>", line 1, in <lambda>
>   File "c:\programme\python243\lib\site-packages\SQLObject-0.7.2-
> py2.4.egg\sqlobject\main.py", line 988, in _SO_loadValue
>     selectResults = self._connection._SO_selectOne(self, dbNames)
>   File "c:\programme\python243\lib\site-packages\SQLObject-0.7.2-
> py2.4.egg\sqlobject\dbconnection.py", line 823, in __getattr__
>     self.assertActive()
>   File "c:\programme\python243\lib\site-packages\SQLObject-0.7.2-
> py2.4.egg\sqlobject\dbconnection.py", line 749, in assertActive
>     assert not self._obsolete, "This transaction has already gone
> through ROLLBACK; begin another transaction"
> AssertionError: This transaction has already gone through ROLLBACK;
> begin another transaction
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to