Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1496 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

SQLAlchemy: AttributeError: 'module' object has no attribute 'create_session'

Reported by: renier Owned by: elvelind
Priority: normal Milestone: 1.0.4
Component: TurboGears Version: 1.0.3
Severity: normal Keywords:
Cc:

Description

I get this when using TurboGears 1.0.3.2 and SQLAlchemy 0.4beta5 by just displaying the stadnard TG welcome page: Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/cherrypy/filters/init.py", line 145, in applyFilters

method()

File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/database.py", line 416, in on_end_resource

session.clear()

File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.0beta5-py2.5.egg/sqlalchemy/ext/activemapper.py", line 26, in getattr

return getattr(self.context.current, name)

File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.0beta5-py2.5.egg/sqlalchemy/ext/sessioncontext.py", line 24, in get_current

return self.registry()

File "build/bdist.linux-i686/egg/sqlalchemy/util.py", line 569, in call File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/turbogears/database.py", line 59, in create_session

return sqlalchemy.create_session()

AttributeError?: 'module' object has no attribute 'create_session' --

Will attach a file that fixes this for me. Patch should be compatible with SQLAlchemy 0.3.10 also.

Thanks,

--Renier

Attachments

database.py.diff Download (384 bytes) - added by renier 11 years ago.

Change History

Changed 11 years ago by renier

comment:1 Changed 11 years ago by faide

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 1.0.4

Should be present in 1.0.4beta1.

Thanks for the patch and time!

Note: See TracTickets for help on using tickets.