You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ponymail.apache.org by GitBox <gi...@apache.org> on 2021/11/10 10:06:07 UTC

[GitHub] [incubator-ponymail-foal] sbp opened a new issue #124: Problem with body_short

sbp opened a new issue #124:
URL: https://github.com/apache/incubator-ponymail-foal/issues/124


   This happened when using 1290575:
   
   ```
   An error code 500 occured while trying to fetch
     https://DOMAIN/api/stats.lua?list=LIST&domain=DOMAIN:
   API error occurred:
   Traceback (most recent call last):
   
   File "main.py", line 133, in handle_request
   output = await xhandler.exec(self, session, indata)
   
   File "/var/www/foal/server/endpoints/stats.py", line 50, in process
   session, query_defuzzed, query_limit=server.config.database.max_hits, shorten=True,
   
   File "/var/www/foal/server/plugins/messages.py", line 356, in query
   if shorten and len(doc["body_short"] or "") > BODY_MAXLEN:
   
   KeyError: 'body_short'
   ```
   
   I tried changing all instances to `doc.get("body_short", "")` and ensuring that the `KeyError` in the `del` is caught, but now it doesn't show any bodies in the archive.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ponymail.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-ponymail-foal] sebbASF removed a comment on issue #124: Problem with body_short

Posted by GitBox <gi...@apache.org>.
sebbASF removed a comment on issue #124:
URL: https://github.com/apache/incubator-ponymail-foal/issues/124#issuecomment-968320164


   AFAICT the body_short database field is not needed, and should be dropped - see thread on dev@ list


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ponymail.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-ponymail-foal] sebbASF commented on issue #124: Problem with body_short

Posted by GitBox <gi...@apache.org>.
sebbASF commented on issue #124:
URL: https://github.com/apache/incubator-ponymail-foal/issues/124#issuecomment-965439551


   Looks like the code assumes that the database has been updated to populate the body_short field.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ponymail.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-ponymail-foal] sebbASF closed issue #124: Problem with body_short

Posted by GitBox <gi...@apache.org>.
sebbASF closed issue #124:
URL: https://github.com/apache/incubator-ponymail-foal/issues/124


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ponymail.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-ponymail-foal] sebbASF commented on issue #124: Problem with body_short

Posted by GitBox <gi...@apache.org>.
sebbASF commented on issue #124:
URL: https://github.com/apache/incubator-ponymail-foal/issues/124#issuecomment-968320164


   AFAICT the body_short database field is not needed, and should be dropped - see thread on dev@ list


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ponymail.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-ponymail-foal] sebbASF commented on issue #124: Problem with body_short

Posted by GitBox <gi...@apache.org>.
sebbASF commented on issue #124:
URL: https://github.com/apache/incubator-ponymail-foal/issues/124#issuecomment-976407307


   I suppose the code could check for body_short in the list of mbox properties and use body instead if it is not present.
   It would be too expensive to do this per email.
   
   But given that there has been no release of the code, I think this is not an issue worth pursuing


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ponymail.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org