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 8525197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:54:24+00:00 2026-06-11T07:54:24+00:00

Using Python, I’m trying to connect to my AppEngine app’s remote_api handler, but I

  • 0

Using Python, I’m trying to connect to my AppEngine app’s remote_api handler, but I keep getting an error. What I want to do is set up the remote_api stubs to route database calls through that and access my app’s datastore directly. So, first, I import the remote_api libraries, then call the ConfigureRemoteApi on the stub module, and try to use the calls to the remote datastore. Here’s some sample code:

from google.appengine.ext.remote_api import remote_api_stub

def test_remote_api():
    # This function is called when I want to use the remote api instead of the local datastore access
    remote_api_stub.ConfigureRemoteApi('myapp.appspot.com', '/_ah/remote_api', auth_func, '')

def auth_func:
    # This actually returns a tuple with my credentials to skip the console input
    return ('username', 'password')

Ok, now, I’ve tested my login information and the app name with remote_api_shell.py, but I get an error like this:

File "C:\Program Files(x86)\Google\google_appengine\google\appengine\tools\dev_appserver_blobstore.py", line 79, in GetBlobStorage
return apiproxy_stub_map.apiproxy.GetStub('blobstore').storage
AttributeError: 'RemoteStub' object has no attribute 'storage'

And then I get a 404: Not Found from the application, which I know to be wrong since accessing the app from the Web does give me the result. What do I need to do to set up the remote_api_stub so I won’t get this error?

Thanks!

  • 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-06-11T07:54:25+00:00Added an answer on June 11, 2026 at 7:54 am

    assuming you are using high replication datastore now…

    Your app_id is probably wrong, and you also need to pass the address parameter. I whipped this up a while back while reading the oreilly book for appengine(book is severely out of date and not recommended)

    def attach_to_app(app_id, user=None, password=None, path=None, address=None):
        """
        attaches to app_id instance at address (default: <app_id>.appspot.com)
    
        if you don't specify a user/password you will be prompted for one
    
        if you don't specify an address it is assumed to be
        <app_id>.appspot.com
    
        path: path to remote_api handler, if not
        specified, will use /_ah/remote_api 
        """
        path = path or "/_ah/remote_api"
    
        if not address:
            address = "%s.appspot.com" % app_id
    
        init_remote_api(app_id, path, address, user=user, password=password)
    
    
    
    
    def auth_func():
        """
        function to prompt user for credentials
        """
        email_address = raw_input("Email Address: ")
        password = getpass.getpass("Password: ")
        return email_address, password
    
    
    def init_remote_api(app_id, path, address, user=None, password=None):
        """
        generic wrapper to initialize the remoteapi for a given path
    
        required
        =========
        app_id : the app_id of the application to connect to
        path: the path to the remote_api handler ex: /_ah/remote_api
        address: server to connect to ex: myapp.appspot.com
    
        if user and password are not specified you will be prompted on
        connection if needed
        """
        if user and password:
            def my_auth():
                return (user, password)
        else:
            my_auth = auth_func
    
        remote_api_stub.ConfigureRemoteApi(app_id, path, my_auth, address)
        remote_api_stub.MaybeInvokeAuthentication()
        os.environ["SERVER_SOFTWARE"] = "Development (remote_api)/1.0"
    
    # example
    APP_ID = "s~myapp" # when hrds was introduced it became necessary to specify app_id and address note the "s~..."
    ADDRESS = "myapp.appspot.com"
    attach_to_app(APP_ID, address=ADDRESS)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using python 3.2, I am trying to decode bytes using str(bytes, cp1251) but I
Using Python I want to create a property in a class, but having the
Using Python, I want to know whether Java is installed.
Using Python I want to randomly rearrange sections of a string based on a
Im using python to access a MySQL database and im getting a unknown column
Using Python, I'm trying to rename a series of .txt files in a directory
Using python 2.6.5 on Windows XP, it seems I'm getting the wrong result when
Using Python 2.6 I want to be able to convert numbers such as 00000,
Using Python I want to replace all URLs in a body of text with
Using Python I want to create a symbolic link pointing to a path that

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.