onaio/onadata

AttributeError: 'NoneType' object has no attribute 'replace'

sentryk8sonalabsorg opened this issue · 0 comments

Sentry Issue: ONADATA-44V

File "/home/appuser/.pyenv/versions/3.10.14/lib/python3.10/site-packages/sentry_sdk/integrations/wsgi.py", line 220, in __iter__
    reraise(*_capture_exception(self._hub))
  File "/home/appuser/.pyenv/versions/3.10.14/lib/python3.10/site-packages/sentry_sdk/_compat.py", line 127, in reraise
    raise value
  File "/home/appuser/.pyenv/versions/3.10.14/lib/python3.10/site-packages/sentry_sdk/integrations/wsgi.py", line 216, in __iter__
    chunk = next(iterator)
  File "/srv/onadata/./onadata/libs/renderers/renderers.py", line 435, in stream_data
    xml.startElement(self.item_tag_name, attributes)
  File "/home/appuser/.pyenv/versions/3.10.14/lib/python3.10/site-packages/django/utils/xmlutils.py", line 35, in startElement
    super().startElement(name, sorted_attrs)
  File "/home/appuser/.pyenv/versions/3.10.14/lib/python3.10/xml/sax/saxutils.py", line 170, in startElement
    self._write(' %s=%s' % (name, quoteattr(value)))
  File "/home/appuser/.pyenv/versions/3.10.14/lib/python3.10/xml/sax/saxutils.py", line 60, in quoteattr
    data = escape(data, entities)
  File "/home/appuser/.pyenv/versions/3.10.14/lib/python3.10/xml/sax/saxutils.py", line 27, in escape
    data = data.replace("&", "&")
AttributeError: 'NoneType' object has no attribute 'replace'