Thread: Weird Error

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    6
    Rep Power
    0

    Weird Error


    I've been getting the following error in my code and I don't quite understand what it means:

    TypeError: 'long' object has no attribute '__getitem__'
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    153
    Rep Power
    5
    It means that the 'long' object has no attribute '__getitem__()'.

    Typically you get this when you try to get an index from a long integer, e.g.:
    Code:
    4L[0]
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    6
    Rep Power
    0
    yea worked out i was missing a line of code lol

IMN logo majestic logo threadwatch logo seochat tools logo