1. adroll
  2. authorize
  3. Issues
Issue #12 new

Misconfigured delimiter causes KeyError

Anonymous created an issue

Having a mismatched delimiter in the configuration produces a misleading error:

{{{ Traceback (most recent call last): File "authtest.py", line 4, in <module> result = a.transaction(amount = u'10', login = u'XXXXXXXX', tran_key = u'XXXXXXXXXXXXXXX', card_num = u'4007000000027', exp_date=u'1010') File "/Users/mihasya/env/shf/lib/python2.6/site-packages/authorize/aim.py", line 190, in transaction return self.request(body) File "/Users/mihasya/env/shf/lib/python2.6/site-packages/authorize/base.py", line 69, in request return self.parse_response(conn.getresponse().read()) File "/Users/mihasya/env/shf/lib/python2.6/site-packages/authorize/aim.py", line 202, in parse_response if dict_response.code != u"1": File "/Users/mihasya/env/shf/lib/python2.6/site-packages/authorize/gen_xml.py", line 152, in getattr return super(dict_accessor, self).getitem(attr) KeyError: 'code' }}}

I intend to submit a quick patch for this when I have a few spare moments (famous last words, I know)

Comments (4)

  1. Log in to comment