Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 682167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:33:55+00:00 2026-05-14T01:33:55+00:00

My GAE app runs fine from my computer, but when I upload it, I

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:33:56+00:00Added an answer on May 14, 2026 at 1:33 am

    Python 2.5 doesn’t have namedtuple. It was added in 2.6.

    Edit: It looks like the _namedtuple function is provided by pylast and will use a real namedtuple in Python 2.6+ but will fall back to a plain old dict in Python 2.5 or older. That means that you’ll have to use sim['item'] or sim.get('item') when running in production.

    Here’s the source for that function:

    def _namedtuple(name, children):
        """
            collections.namedtuple is available in (python >= 2.6)
        """
    
        v = sys.version_info
        if v[1] >= 6 and v[0] < 3:
            return collections.namedtuple(name, children)
        else:
            def fancydict(*args):
                d = {}
                i = 0
                for child in children:
                    d[child.strip()] = args[i]
                    i += 1
                return d
    
            return fancydict
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a GAE app that works just fine from my browser, but can't
I'm trying to have my GAE app pull some records from the Datastore but
I am trying to upload my GAE app using the console in windows. I
My Wicket application runs fine on the live Google App Engine at /* <filter-mapping>
I'm building a GAE app that has objects with a lot of boolean properties.
In designing my GWT/GAE app, it has become evident to me that my client-side
I know that when your Google App Engine (GAE) app has 0 instances running
im running a multi tenant GAE app where each tenant could have from a
I'd like to monitor the dashboard of one GAE app (java) from one other
I have run the local GAE app server ( dev_appserver.py ) from Eclipse and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.