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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:54:03+00:00 2026-05-30T14:54:03+00:00

I’m trying to set up a protorpc service using google app engine python 2.7,

  • 0

I’m trying to set up a protorpc service using google app engine python 2.7, and as far as I can remember, this was working fine until it suddenly stopped working and now I can’t figure out what’s going wrong.

Error:

__call__() takes exactly 1 argument (3 given)
Traceback (most recent call last):
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1040, in __call__
    return self.handler(request, *args, **kwargs)
TypeError: __call__() takes exactly 1 argument (3 given)

Traceback (most recent call last):
  File "/base/data/home/apps/s~smokin-goldshop/15.356936819989737198/handler/orderajax.py", line 78, in main
    util.run_wsgi_app(application)
  File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/webapp/util.py", line 98, in run_wsgi_app
    run_bare_wsgi_app(add_wsgi_middleware(application))
  File "/base/python27_runtime/python27_lib/versions/1/google/appengine/ext/webapp/util.py", line 116, in run_bare_wsgi_app
    result = application(env, _start_response)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1519, in __call__
    response = self._internal_error(e)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1511, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1040, in __call__
    return self.handler(request, *args, **kwargs)
TypeError: __call__() takes exactly 1 argument (3 given)

Code in question:

import logging
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util

from protorpc import messages
from protorpc import remote
from protorpc import service_handlers
from protorpc.service_handlers import ServiceHandlerFactory

from customerhandler import CustomerHandler
from models.customer import Customer


class BlacklistRequest(messages.Message):
    BlackListType = messages.StringField(1, required = True)
    Customer = messages.StringField(2, required = True)

class BlacklistResponse(messages.Message):
    Response = messages.StringField(1, required = True)

class BlacklistAjax(remote.Service):
    @remote.method(BlacklistRequest, BlacklistResponse)
    def ajax(self, request):
        logging.debug("starting")
        tRequest = request
        logging.debug(str(tRequest))
        tArgumentDic = {}
        tCustomerHandler = CustomerHandler()
        tCustomer = Customer()
        logging.debug("Beginning Blacklist of type " + tRequest.BlackListType + " for customer " + tRequest.Customer)

        if(tRequest.BlackListType == 'PA'):
            tCustomerHandler.PaBlacklistCustomer(tRequest.Customer)
            logging.debug("Blacklisted PA")
            return BlacklistResponse(Response = "PA Blacklisted!")
        elif(tRequest.BlackListType == 'Global'):
            tCustomerHandler.GlobalBlacklistCustomer(tRequest.Customer)
            logging.debug("Blacklisted Global")
            return BlacklistResponse(Response = "Global Blacklisted!")
        else:
            logging.debug("Error Blacklisting")
            return BlacklistResponse(Response = "Error Blacklisting")



service_mappings = service_handlers.service_mapping(
    [('/orderajax', OrderAjax),
     ('/blacklist', BlacklistAjax)
    ])

application = webapp.WSGIApplication(service_mappings, debug=True)

def main():
    util.run_wsgi_app(application)

if __name__ == '__main__':
    main()
  • 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-30T14:54:05+00:00Added an answer on May 30, 2026 at 2:54 pm

    After banging my head against my desk several times, I did some digging and found the following:

    Short Answer

    It appears that the webapp2 module does not support protorpc at the current time or vice versa. The only way to use protorpc is to switch to the webapp module instead of webapp2 in which case you also need to revert to Python 2.5 and set threadsafe to false in app.yaml, eg:

    # -- snip --   
    runtime: python25
    threadsafe: false
    # -- /snip --
    

    Long Answer

    http://code.google.com/p/webapp-improved/issues/detail?id=16 in which the project maintainer (Rodrigo Moraes) states:

    Sep 17, 2011

    I’ve been thinking on the subject and the best would be probably to
    remove webapp2_extras.protorpc. It is only usable with the 2.5
    runtime, and has no reason to exist when webapp2 replaces webapp: it
    is protorpc that needs to support webapp2 in the 2.7 runtime, as it it
    did with webapp.

    Nov 10, 2011

    I believe the ProtoRPC project should provide a way.

    The webapp2_extras.protorpc package will be removed as it makes no
    sense to maintain it anymore.

    Jan 24, 2012

    webapp2_extras.protorpc was removed from version 2.4.

    I’d like to support this but there’s a bit too much magic involved, so
    better to have it as a separated, actively maintained project (or if
    protorpc project supports it by default).

    Therefore an issue has been opened in the protorpc project which requests webapp2 support: http://code.google.com/p/google-protorpc/issues/detail?id=38

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
I am using Paperclip to handle profile photo uploads in my app. They upload
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.