Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #44646

Re: query from sqlalchemy returns AttributeError: 'NoneType' object

Date 2013-05-03 00:17 +0100
From MRAB <python@mrabarnett.plus.com>
Subject Re: query from sqlalchemy returns AttributeError: 'NoneType' object
References <cc9b6315-dcd5-42c7-a5ca-e5df1d51348c@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.1255.1367536656.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 02/05/2013 23:14, karthik.sharma@gmail.com wrote:
[snip]
>
>      ########################################################################
>      class SourcetoPort(Base):
>          """"""
>          __tablename__ = 'source_to_port'
>          id = Column(Integer, primary_key=True)
>          port_no        = Column(Integer)
>          src_address    = Column(String,index=True)
>
>          #----------------------------------------------------------------------
>          def __init__(self, src_address,port_no):
>              """"""
>              self.src_address = src_address

The indentation of this line looks wrong:

>      	   self.port_no     = port_no
>
>      ########################################################################
[snip]

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

query from sqlalchemy returns AttributeError: 'NoneType' object karthik.sharma@gmail.com - 2013-05-02 15:14 -0700
  Re: query from sqlalchemy returns AttributeError: 'NoneType' object MRAB <python@mrabarnett.plus.com> - 2013-05-03 00:17 +0100
  Re: query from sqlalchemy returns AttributeError: 'NoneType' object Dave Angel <davea@davea.name> - 2013-05-02 19:29 -0400

csiph-web