Problem solved:

In case anyone comes across this in the future, an upgrade to the
latest Turbogears 1.1b put this right.

Tim

On Sep 23, 6:28 pm, picoplex <[EMAIL PROTECTED]> wrote:
> I have developed a TG1.1/Elixir/SQLAlchemyapplication on windows and
> tried to port it to Linux.
>
> Although cx_Oracle andSQLAlchemyseem to work when tested in
> isolation, my Turbogears app chokes with:
>
> "InvalidRequestError: Could not locate any Engine or Connection bound
> to mapper..."
>
> when trying to perform a query.
>
> The versions of the various components (e.g.SQLAlchemy: win: '0.4.5',
> linux: '0.4.0' & Elixir: win:  '0.5.2'  linux:  '0.6.1') are slightly
> different, although the version of Turbogears (1.1b1) I have kept the
> same.
>
> Has anyone any ideas what could be behind this? (Error trace below)
>
> Thanks for your thoughts,
>
> Tim
>
> Page handler: <bound method Root.productSupplierGridData of
> <flow.controllers.Root object at 0x94e4b0c>>
> Traceback (most recent call last):
>   File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/
> cherrypy/_cphttptools.py", line 105, in _run
>     self.main()
>   File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/
> cherrypy/_cphttptools.py", line 254, in main
>     body = page_handler(*virtual_path, **self.params)
>   File "<string>", line 3, in productSupplierGridData
>   File "/usr/lib/python2.5/site-packages/TurboGears-1.1b1dev_r3555-
> py2.5.egg/turbogears/controllers.py", line 345, in expose
>     *args, **kw)
>   File "<string>", line 5, in run_with_transaction
>   File "/usr/lib/python2.5/site-packages/TurboGears-1.1b1dev_r3555-
> py2.5.egg/turbogears/database.py", line 399, in sa_rwt
>     retval = func(*args, **kw)
>   File "<string>", line 5, in _expose
>   File "/usr/lib/python2.5/site-packages/TurboGears-1.1b1dev_r3555-
> py2.5.egg/turbogears/controllers.py", line 360, in <lambda>
>     mapping, fragment, args, kw)))
>   File "/usr/lib/python2.5/site-packages/TurboGears-1.1b1dev_r3555-
> py2.5.egg/turbogears/controllers.py", line 387, in _execute_func
>     output = errorhandling.try_call(func, *args, **kw)
>   File "/usr/lib/python2.5/site-packages/TurboGears-1.1b1dev_r3555-
> py2.5.egg/turbogears/errorhandling.py", line 72, in try_call
>     return func(self, *args, **kw)
>   File "/usr/local/flow/trunk/flow/controllers.py", line 315, in
> productSupplierGridData
>     orderByString=orderByString)
>   File "/usr/local/flow/trunk/flow/controllers.py", line 167, in
> getFilterRecordsAndTotal
>     totalRecs = theClass.query().filter(filterString).count()
>   File 
> "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/orm/query.py",
>  line 758, in count
>     return q._count()
>   File 
> "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/orm/query.py",
>  line 785, in _count
>     return self.session.scalar(s, params=self._params,
> mapper=self.mapper)
>   File 
> "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/orm/session.py",
>  line 532, in scalar
>     engine = self.get_bind(mapper, clause=clause)
>   File 
> "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/orm/session.py",
>  line 641, in get_bind
>     raise exceptions.InvalidRequestError("Could not locate any Engine
> or Connection bound to mapper '%s'" % str(mapper))
> InvalidRequestError: Could not locate any Engine or Connection bound
> to mapper 'Mapper|prodsupp|prodsupp'
--~--~---------~--~----~------------~-------~--~----~
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