Error Handling in Python with SUDS

馋奶兔 提交于 2019-11-29 01:31:46

If you want to catch that exception you should put

try:
    result = client.service.AbsoluteMove(token, dest, speed)
except suds.WebFault as detail:
    ...
shashaDenovo

If you handled all exceptions and errors in your code and your code is working fine but still you are getting below message with your correct output.

Msg : "No handlers could be found for logger suds.client "

Then a simple solution is to add this line

logging.getLogger('suds.client').setLevel(logging.CRITICAL)

in yourclient.py file just after all import statement.

You need to catch suds.WebFault by the looks of that traceback. The error itself seems legitimate, IE, your requests are being executed correctly, but perhaps your parameters are wrong in the given context.

eel ghEEz

I believe you refer to a harmless diagnostic message in your comment. I could suppress messages from suds calling logging.error() by assigning logging.INFO to basicConfig and logging.CRITICAL to suds.client.

https://fedorahosted.org/suds/wiki/Documentation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!