On 11/30/2015 09:20 AM, Srikanth Bemineni wrote: > Hi all, > > How do we debug these kind of issues in python ?. The problem was > completely some where else, but error was thrown during database > operation, with no info on the actual issue.
it's a dynamic language, so whatever works - we just debugged this issue, and that's....how you'd do it ! :) > > Srikanth > > On Sunday, November 29, 2015 at 8:13:45 PM UTC-6, Srikanth Bemineni wrote: > > Hi, > > I am going through the Pyramid quick tutorial. > > While initializing the database, I am getting the below error. Can > some one point me out, what would cause this error. I am completely > new to python and pyramid moving here from Ruby world. > > > http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/databases.html > > <http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/databases.html> > > > izero@Rudra ~/devel/pyramid/databases $ > ~/python-site-dist/intialize_tutorial_db development.ini > 2015-11-29 20:02:46,173 INFO > [sqlalchemy.engine.base.Engine][MainThread] SELECT CAST('test plain > returns' AS VARCHAR(60)) AS anon_1 > 2015-11-29 20:02:46,173 INFO > [sqlalchemy.engine.base.Engine][MainThread] () > 2015-11-29 20:02:46,173 INFO > [sqlalchemy.engine.base.Engine][MainThread] SELECT CAST('test > unicode returns' AS VARCHAR(60)) AS anon_1 > 2015-11-29 20:02:46,173 INFO > [sqlalchemy.engine.base.Engine][MainThread] () > 2015-11-29 20:02:46,174 INFO > [sqlalchemy.engine.base.Engine][MainThread] PRAGMA > table_info("wikipages") > 2015-11-29 20:02:46,174 INFO > [sqlalchemy.engine.base.Engine][MainThread] () > 2015-11-29 20:02:46,175 DEBUG [tutorial.initialize_db][MainThread] > <tutorial.models.Page object at 0xb658a8ac> > 2015-11-29 20:02:46,175 DEBUG [tutorial.initialize_db][MainThread] Root > Traceback (most recent call last): > File "/home/izero/python-site-dist/intialize_tutorial_db", line 9, > in <module> > load_entry_point('tutorial==0.0.0', 'console_scripts', > 'intialize_tutorial_db')() > File > "/home/izero/devel/pyramid/databases/tutorial/initialize_db.py", > line 40, in main > DBSession.add(model) > File > > "/home/izero/python-site-dist/SQLAlchemy-1.0.9-py3.4-linux-i686.egg/sqlalchemy/orm/scoping.py", > line 150, in do > return getattr(self.registry(), name)(*args, **kwargs) > File > > "/home/izero/python-site-dist/SQLAlchemy-1.0.9-py3.4-linux-i686.egg/sqlalchemy/orm/session.py", > line 1588, in add > self._save_or_update_state(state) > File > > "/home/izero/python-site-dist/SQLAlchemy-1.0.9-py3.4-linux-i686.egg/sqlalchemy/orm/session.py", > line 1600, in _save_or_update_state > self._save_or_update_impl(state) > File > > "/home/izero/python-site-dist/SQLAlchemy-1.0.9-py3.4-linux-i686.egg/sqlalchemy/orm/session.py", > line 1855, in _save_or_update_impl > self._save_impl(state) > File > > "/home/izero/python-site-dist/SQLAlchemy-1.0.9-py3.4-linux-i686.egg/sqlalchemy/orm/session.py", > line 1827, in _save_impl > self._attach(state) > File > > "/home/izero/python-site-dist/SQLAlchemy-1.0.9-py3.4-linux-i686.egg/sqlalchemy/orm/session.py", > line 1955, in _attach > self.dispatch.after_attach(self, state.obj()) > File > > "/home/izero/python-site-dist/SQLAlchemy-1.0.9-py3.4-linux-i686.egg/sqlalchemy/event/attr.py", > line 256, in __call__ > fn(*args, **kw) > TypeError: after_attach() missing 1 required positional argument: > 'instance' > > Srikanth > > -- > You received this message because you are subscribed to the Google > Groups "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to sqlalchemy+unsubscr...@googlegroups.com > <mailto:sqlalchemy+unsubscr...@googlegroups.com>. > To post to this group, send email to sqlalchemy@googlegroups.com > <mailto:sqlalchemy@googlegroups.com>. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.