[Tutor] query from sqlalchemy returns AttributeError: 'NoneType' object
Alan Gauld
alan.gauld at btinternet.com
Fri May 3 11:13:40 CEST 2013
On 02/05/13 23:13, Karthik Sharma wrote:
This doesn't have much to do with learning Python and a lot to do with
SqlAlchemy so you'd be better off asking on a SqlAlchemy forum I suspect.
However, some basic debugging investigation first may help your cause.
For example...
> Traceback (most recent call last):
...
> File "/home/karthik/pox/tutorial.py", line 118, in _handle_PacketIn
> self.act_like_switch(packet, packet_in)
> File "/home/karthik/pox/tutorial.py", line 86, in act_like_switch
> self.send_packet(packet_in.buffer_id,
> packet_in.data,q_res.port_no, packet_in.in_port)
> AttributeError: 'NoneType' object has no attribute 'port_no'
Have you checked to see what q_res is supposed to be?
And where it comes from? And why it's apparently a NoneType?
Some print statements might be in order?
That will help anyone who can help you to so do.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list