GAE AttributeError

Posted by awegawef on Stack Overflow See other posts from Stack Overflow or by awegawef
Published on 2010-03-22T14:44:34Z Indexed on 2010/03/22 15:01 UTC
Read the original article Hit count: 466

My GAE app runs fine from my computer, but when I upload it, I start getting an AttributeError, specifically:

AttributeError: 'dict' object has no attribute 'item'

I am using the pylast interface (an API for last.fm--link). Specifically, I am accessing a list of variables of this type:

SimilarItem = _namedtuple("SimilarItem", ["item", "match"])

I have a variable of this type, call it sim, and I am trying to access sim.item when I get the attribute error.

I should note that I am using Python 2.6 on my computer, and I understand that GAE runs on Python 2.5. Would that make a difference here? I thought they were backwards-compatible.

Lastly, I think it could be a possible problem with the modules that pylast imports--maybe they don't work with GAE or something? I did some research but I didn't get any results. Here are the imports:

import hashlib
import httplib
import urllib
import threading
from xml.dom import minidom
import xml.dom
import time
import shelve
import tempfile
import sys
import htmlentitydefs

I would appreciate any help with this frustrating issue. Thanks in advance.

© Stack Overflow or respective owner

Related posts about google-app-engine

Related posts about attributeerror