views:

19

answers:

1

The error that I am receiving is the following:

Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 511, in __call__
handler.get(*groups)
TypeError: get() takes exactly 1 argument (2 given)

What's crazy is I only get it once I deploy the application - on the development server, it works perfectly fine. I'm tearing my hair out!

import cgi
import os
import string

from google.appengine.api import users
from google.appengine.ext import webapp, db
from google.appengine.ext.webapp import util, template
from google.appengine.ext.webapp import template
from models import *
from functions import *

class ListView(webapp.RequestHandler):
    def get(self, f):
        url = users.create_logout_url(self.request.uri)

        u = parse_url(f)

        votergroup = Voter.all()
        votergroup.filter('lists =', u['list'])

        customlists = CustomList.all()

        template_values = {
                'votergroup': votergroup,
                'customlists': customlists,
                'url': url
                }
        path = os.path.join(os.path.dirname(__file__), 'templates/list_view.html')
        self.response.out.write(template.render(path, template_values))

class CreateList(webapp.RequestHandler):
    def get(self, f):
        if users.is_current_user_admin():
            cuser = None
        else:
            cuser = CampaignUser.all()
            cuser.filter('uaccount =', users.get_current_user())
            cuser = cuser[0]

        u = parse_url(f)

        c = db.get(u['group'])
        filters = CustomGroupFilter.all()
        filters.filter('customquery =', c.key())

        l = CustomList()
        l.name = 'Custom List: ' + c.name
        l.campaign = cuser.campaign
        l.put()

        votergroup = Voter.all()
        for filt in filters:
            votergroup.filter(filt.queryfield + ' =', string.upper(filt.query))

        for v in votergroup:
            v.lists.append(str(l.key()))
            v.put()

        self.redirect('/list/target/custom/list/' + str(l.key()))

application = webapp.WSGIApplication(
                [('/list/target/create/(.*)', CreateList),
                 ('/list/(.*)', ListView)],
                debug=True)

def main():
    util.run_wsgi_app(application)

if __name__ == "__main__":
    main()
A: 

I figured out what was wrong. I had changed the version string for the app - so even though I was updating it, it was pulling from the old "version". Setting the new one to default worked.

etc