Held Message view, JSONDecodeError: Invalid control character
I am running the Debian 10 mailman3 and mailman3-web packages with mariadb. I received an email to the list from an invoicing software and now I am unable to view or accept this email from the list. All other lists seem to be still working fine. I'm guessing there is a piece of data in my database that is corrupt or unable to be decoded, but I am at a loss on how to find and fix it. Any help would be greatly appreciated
Sep 11 12:29:23 2020 (11577) 127.0.0.1 - - "GET /3.1/lists/redacted@redacted.com/held?count=0&page=1 HTTP/1.1" 200 90
Sep 11 12:29:23 2020 (11577) REST request handler error:
Traceback (most recent call last):
File "/usr/lib/python3.7/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 50, in wrapper
rtn = function(*args, **kws)
File "/usr/lib/python3/dist-packages/mailman/rest/wsgiapp.py", line 216, in __call__
return super().__call__(environ, start_response)
File "falcon/api.py", line 215, in falcon.api.API.__call__
File "falcon/api.py", line 189, in falcon.api.API.__call__
File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 160, in on_get
resource = self._make_collection(request)
File "/usr/lib/python3/dist-packages/mailman/rest/helpers.py", line 159, in _make_collection
for resource in collection]
File "/usr/lib/python3/dist-packages/mailman/rest/helpers.py", line 159, in <listcomp>
for resource in collection]
File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 150, in _resource_as_dict
resource = self._make_resource(request.id)
File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 70, in _make_resource
resource = super()._make_resource(request_id)
File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 39, in _make_resource
results = requests.get_request(request_id)
File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 85, in wrapper
return function(args[0], config.db.store, *args[1:], **kws)
File "/usr/lib/python3/dist-packages/mailman/model/requests.py", line 120, in get_request
result.data_hash, expunge=False)
File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 85, in wrapper
return function(args[0], config.db.store, *args[1:], **kws)
File "/usr/lib/python3/dist-packages/mailman/model/pending.py", line 142, in confirm
value = json.loads(keyvalue.value)
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 21 (char 20)
On 9/14/20 5:22 AM, mm3@hovo.id.au wrote:
I am running the Debian 10 mailman3 and mailman3-web packages with mariadb. I received an email to the list from an invoicing software and now I am unable to view or accept this email from the list. All other lists seem to be still working fine. I'm guessing there is a piece of data in my database that is corrupt or unable to be decoded, but I am at a loss on how to find and fix it. Any help would be greatly appreciated
Sep 11 12:29:23 2020 (11577) 127.0.0.1 - - "GET /3.1/lists/redacted@redacted.com/held?count=0&page=1 HTTP/1.1" 200 90 Sep 11 12:29:23 2020 (11577) REST request handler error: Traceback (most recent call last): File "/usr/lib/python3.7/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/usr/lib/python3/dist-packages/mailman/rest/wsgiapp.py", line 216, in __call__ return super().__call__(environ, start_response) File "falcon/api.py", line 215, in falcon.api.API.__call__ File "falcon/api.py", line 189, in falcon.api.API.__call__ File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 160, in on_get resource = self._make_collection(request) File "/usr/lib/python3/dist-packages/mailman/rest/helpers.py", line 159, in _make_collection for resource in collection] File "/usr/lib/python3/dist-packages/mailman/rest/helpers.py", line 159, in <listcomp> for resource in collection] File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 150, in _resource_as_dict resource = self._make_resource(request.id) File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 70, in _make_resource resource = super()._make_resource(request_id) File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 39, in _make_resource results = requests.get_request(request_id) File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3/dist-packages/mailman/model/requests.py", line 120, in get_request result.data_hash, expunge=False) File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3/dist-packages/mailman/model/pending.py", line 142, in confirm value = json.loads(keyvalue.value)
There is some value with a key not 'type' in the pendedkeyvalue table which is the issue here.
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads return _default_decoder.decode(s) File "/usr/lib/python3.7/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Invalid control character at: line 1 column 21 (char 20)
Examine the table looking at the 21st character of values with keys not = 'type', most likely keys 'email' or 'message_id'.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks Mark for pointing me to the correct table to look at, The entry turned out to be spam and not the invoice that I was trying to accept so I was able to remove the spam message inside this table and the refrance to it in _requests.
participants (2)
-
Mark Sapiro
-
mm3@hovo.id.au