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

  • Home
  • SEARCH
  • 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 6133041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:10:34+00:00 2026-05-23T17:10:34+00:00

I am having a very odd error occurring in the following: class ServeHandler(blobstore_handlers.BlobstoreDownloadHandler): def

  • 0

I am having a very odd error occurring in the following:

class ServeHandler(blobstore_handlers.BlobstoreDownloadHandler):
def get(self, resource):
    iconKey = str(urllib.unquote(resource))

    if iconKey:
        blob_info = blobstore.get(iconKey)

        if blob_info:
            url = images.get_serving_url(blob_key=iconKey, size=200)

            self.response.out.write('<h1>%s</h1><small>%s</small><br/><br/><img src="%s" alt="%s">' % ('A Title', '11-26-1997', url, 'A Title'))

The response is this:

TypeError: get() takes exactly 1 argument (2 given)

The code is suposed to take the end of the URL request, pass that to the iconKey var, and use it as a blob key to access the blobstore for the image and create a serving url with the images.get_serving_url() method.

Anybody run into this before? I tried putting a @staticmethod parameter over the get definition, but of course, that made the get method not be able to access the request via self.

EDIT

I just changed something which got another error. I had been using the ([^/]+)? regexp for the URL – where the URL would be /view/icon/76M5e-xIStHRJDYyXBXjDA== and the resource passed to the get() method would be the 76M5e-xIStHRJDYyXBXjDA== ending of the URL.

I just change the regexp to (.*) as per @systempuntoout’s answer below. Now I get this error: AttributeError: split with this stack trace:

ERROR    2011-07-15 13:19:39,949 __init__.py:463] split
Traceback (most recent call last):
File "/Users/mac/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/__init__.py", line 700, in __call__
handler.get(*groups)
File "/Users/mac/icondatabase/main.py", line 72, in get
iconKey = str(urllib.unquote(self.request))
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.py", line 1164, in unquote
File "/Users/mac/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webob/webob/__init__.py", line 500, in __getattr__
raise AttributeError(attr)
AttributeError: split
INFO     2011-07-15 13:19:39,958 dev_appserver.py:4217] "GET /view/icon/76M5e-xIStHRJDYyXBXjDA== HTTP/1.1" 500 -
INFO     2011-07-15 13:19:40,250 dev_appserver.py:4217] "GET /favicon.ico HTTP/1.1" 404 -
  • 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-23T17:10:34+00:00Added an answer on May 23, 2026 at 5:10 pm

    You are probably not matching any resource group parameter in your URL regex configuration.

    Be sure to have a rule like this in your main:

     application = webapp.WSGIApplication(
              [(r'/files/(.*)', ServeHandler)], debug=True)
        run_wsgi_app(application)
    

    This will pass to the get() resource parameter of the ServeHandler instance, the string matched after the route /files/.

    Example:
    localhost:8080/files/A2312ODESDX will pass A2312ODESDX as resource

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having this very odd issue while trying to serialize a class for logging
I'm having a very confusing error between SharePoint and SQL Server 2k5. My SQL
I am having a very odd problem with Visual Studio 2010. After using it
I am having a very odd issue retrieving/retaining a variable in my iPhone application
I'm having a very odd problem in C# and I'm not sure what is
I'm having a very odd problem with grouping a set of nodes in a
I seem to be having a very odd problem with my iPhone project in
Currently having this really odd problem with my layout IE7. I'm not very experienced
I'm having a very odd problem that I can't seem to track down. Any
I am having a very odd problem with local variables being out of context

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.