Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in logger.error() call: 'list' object has no attribute '_code' #57

Open
jedie opened this issue Jul 11, 2019 · 1 comment
Open
Labels

Comments

@jedie
Copy link
Contributor

jedie commented Jul 11, 2019

Traceback (most recent call last):
...
  File "/usr/local/lib/python3.6/site-packages/oscar_docdata/facade.py", line 101, in create_payment
    order_key = super(Facade, self).create_payment(order_number, total, user, language=language, description=description, profile=profile, merchant_name=merchant_name, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/oscar_docdata/interface.py", line 108, in create_payment
    createsuccess = client.create(**call_args)
  File "/usr/local/lib/python3.6/site-packages/oscar_docdata/gateway.py", line 342, in create
    log_docdata_error(error, "DocdataClient: failed to create payment for order %s", order_id)
  File "/usr/local/lib/python3.6/site-packages/oscar_docdata/gateway.py", line 111, in log_docdata_error
    logger.error(u"{0}: code={1}, error={2}".format(message, soap_error._code, soap_error.value), *args, **kwargs)
AttributeError: 'list' object has no attribute '_code'

It seems that soap_error is a list.

EDIT: The soap MESSAGE is:

b'<?xml version=\'1.0\' encoding=\'UTF-8\'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><createResponse xmlns="http://www.docdatapayments.com/services/paymentservice/1_3/" ddpXsdVersion="1.3.14"><createErrors><error code="SECURITY_ERROR">Login failed.</error></createErrors></createResponse></S:Body></S:Envelope>'

@maerteijn maerteijn added the bug label Aug 26, 2019
@maerteijn
Copy link
Member

A pull request would be welcome to fix this (this is probably changed in the 1.3 XSD)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants