You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I'm using a selfhosted version of pretix.
Since a few weeks ago, I'm getting the following error on the order confirmation when using pretix-sofort:
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1 lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1
I then did update the whole server from Debian Buster to Bookworm, upgraded Python from 3.7 to 3.11 and upgraded the Pretix installation and all the plugins to the latest version. Also did an upgrade to Postgres 15.
Now everything works as expected, only the SyntaxError in the Sofort plugin persists. Is the syntax something that could be corrected in the Pretix Backend? The error ocurred after having a working plugin for quite some time (since Buster basically), no changes have been made in Pretix and the last updates before that also happened some time ago.
The user that wants to buy tickets is presented with an internal server error, emails are being sent and therefore the order is confirmed as ordered but not paid.
full error log
ERROR 2024-04-24 08:04:54,027 django.request log Internal Server Error: /VK/HOL-6/order/.../.../pay/8995/confirm
Traceback (most recent call last):
File "/var/pretix/venv/lib/python3.11/site-packages/pretix_sofort/sofort.py", line 130, in from_xml
root = etree.fromstring(xml)
^^^^^^^^^^^^^^^^^^^^^
File "src/lxml/etree.pyx", line 3287, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1989, in lxml.etree._parseMemoryDocument
File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseDoc
File "src/lxml/parser.pxi", line 1164, in lxml.etree._BaseParser._parseDoc
File "src/lxml/parser.pxi", line 633, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 743, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 672, in lxml.etree._raiseParseError
File "", line 1
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/pretix/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/utils/decorators.py", line 46, in _wrapper
return bound_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/views/decorators/clickjacking.py", line 58, in wrapper_view
resp = view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/utils/decorators.py", line 46, in _wrapper
return bound_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix/presale/views/init.py", line 500, in wrapped_view
resp = view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix/presale/views/order.py", line 449, in dispatch
return super().dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix/presale/views/robots.py", line 41, in dispatch
resp = super().dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 143, in dispatch
return handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix/presale/views/order.py", line 467, in post
resp = self.payment.payment_provider.execute_payment(request, self.payment)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix_sofort/payment.py", line 129, in execute_payment
trans = sofort.NewTransaction.from_xml(self._api_call(r.to_xml()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix_sofort/sofort.py", line 132, in from_xml
raise SofortError("Invalid XML received: " + xml.decode())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix_sofort/sofort.py", line 16, in init
errors = etree.fromstring(xml)
^^^^^^^^^^^^^^^^^^^^^
File "src/lxml/etree.pyx", line 3287, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1989, in lxml.etree._parseMemoryDocument
File "src/lxml/parser.pxi", line 1869, in lxml.etree._parseDoc
File "src/lxml/parser.pxi", line 1105, in lxml.etree._BaseParser._parseUnicodeDoc
File "src/lxml/parser.pxi", line 633, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 743, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 672, in lxml.etree._raiseParseError
File "", line 1
lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1
The text was updated successfully, but these errors were encountered:
My mistake, Sofort GmbH went out of business and they discontinued all existing seller contracts. So yes, basically it was a problem with the API credentials.
There'll be SEPA instant payments soon, so no more need for third party providers.
Hey, I'm using a selfhosted version of pretix.
Since a few weeks ago, I'm getting the following error on the order confirmation when using pretix-sofort:
lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1
lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1
I then did update the whole server from Debian Buster to Bookworm, upgraded Python from 3.7 to 3.11 and upgraded the Pretix installation and all the plugins to the latest version. Also did an upgrade to Postgres 15.
Now everything works as expected, only the SyntaxError in the Sofort plugin persists. Is the syntax something that could be corrected in the Pretix Backend? The error ocurred after having a working plugin for quite some time (since Buster basically), no changes have been made in Pretix and the last updates before that also happened some time ago.
The user that wants to buy tickets is presented with an internal server error, emails are being sent and therefore the order is confirmed as ordered but not paid.
full error log
ERROR 2024-04-24 08:04:54,027 django.request log Internal Server Error: /VK/HOL-6/order/.../.../pay/8995/confirm Traceback (most recent call last): File "/var/pretix/venv/lib/python3.11/site-packages/pretix_sofort/sofort.py", line 130, in from_xml root = etree.fromstring(xml) ^^^^^^^^^^^^^^^^^^^^^ File "src/lxml/etree.pyx", line 3287, in lxml.etree.fromstring File "src/lxml/parser.pxi", line 1989, in lxml.etree._parseMemoryDocument File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseDoc File "src/lxml/parser.pxi", line 1164, in lxml.etree._BaseParser._parseDoc File "src/lxml/parser.pxi", line 633, in lxml.etree._ParserContext._handleParseResultDoc File "src/lxml/parser.pxi", line 743, in lxml.etree._handleParseResult File "src/lxml/parser.pxi", line 672, in lxml.etree._raiseParseError File "", line 1 lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/pretix/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/utils/decorators.py", line 46, in _wrapper
return bound_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/views/decorators/clickjacking.py", line 58, in wrapper_view
resp = view_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/utils/decorators.py", line 46, in _wrapper
return bound_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix/presale/views/init.py", line 500, in wrapped_view
resp = view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix/presale/views/order.py", line 449, in dispatch
return super().dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix/presale/views/robots.py", line 41, in dispatch
resp = super().dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 143, in dispatch
return handler(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix/presale/views/order.py", line 467, in post
resp = self.payment.payment_provider.execute_payment(request, self.payment)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix_sofort/payment.py", line 129, in execute_payment
trans = sofort.NewTransaction.from_xml(self._api_call(r.to_xml()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix_sofort/sofort.py", line 132, in from_xml
raise SofortError("Invalid XML received: " + xml.decode())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/pretix/venv/lib/python3.11/site-packages/pretix_sofort/sofort.py", line 16, in init
errors = etree.fromstring(xml)
^^^^^^^^^^^^^^^^^^^^^
File "src/lxml/etree.pyx", line 3287, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1989, in lxml.etree._parseMemoryDocument
File "src/lxml/parser.pxi", line 1869, in lxml.etree._parseDoc
File "src/lxml/parser.pxi", line 1105, in lxml.etree._BaseParser._parseUnicodeDoc
File "src/lxml/parser.pxi", line 633, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 743, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 672, in lxml.etree._raiseParseError
File "", line 1
lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1
The text was updated successfully, but these errors were encountered: