AttributeError means that there was an Error that had to do with an 
Attribute request. In general, when you write x.y, y is the purported 
attribute of x. NoneType means that instead of an instance of whatever 
Class or Object you think you're working with, you've actually got None 
<http://net-informations.com/python/basics/none.htm>. That usually means 
that an assignment or function call up failed or returned an unexpected 
result.

mylist = mylist.sort()

The sort() method of a list sorts the list in-place, that is, mylist is 
modified. But the actual return value of the method is None and not the 
list sorted. So you've just assigned None to mylist. If you next try to do, 
say, mylist.append(1) Python will give you this error.



On Tuesday, November 11, 2008 at 6:58:41 AM UTC+5:30 arashf wrote:

> Traceback (most recent call last):
> File "/srv/server/metaserver/metaserver/lib/base.py", line 56, in
> __call__
> ret = WSGIController.__call__(self, environ, start_response)
> File "/usr/lib/python2.5/site-packages/Pylons-0.9.6.2-py2.5.egg/pylons/
> controllers/core.py", line 195, in __call__
> after = self._inspect_call(self.__after__)
> wasn't getting this on the betas of sqlalchemy, but am getting it on
> rc3. any ideas?
>
> File "/usr/lib/python2.5/site-packages/Pylons-0.9.6.2-py2.5.egg/pylons/
> controllers/core.py", line 79, in _inspect_call
> result = func(**args)
> File "/srv/server/metaserver/metaserver/lib/base.py", line 96, in
> __after__
> metaserver.model.Session.commit()
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc3-py2.5.egg/
> sqlalchemy/orm/scoping.py", line 121, in do
> return getattr(self.registry(), name)(*args, **kwargs)
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc3-py2.5.egg/
> sqlalchemy/orm/session.py", line 670, in commit
> self.transaction.commit()
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc3-py2.5.egg/
> sqlalchemy/orm/session.py", line 385, in commit
> self._remove_snapshot()
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc3-py2.5.egg/
> sqlalchemy/orm/session.py", line 306, in _remove_snapshot
> _expire_state(s, None)
> File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc3-py2.5.egg/
> sqlalchemy/orm/attributes.py", line 985, in expire_attributes
> self.dict.pop(key, None)
> AttributeError: 'NoneType' object has no attribute 'pop'

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/0015b592-77c1-4161-b7da-bd23f72a7023n%40googlegroups.com.

Reply via email to