2017-01-11 8 views
1

私はPythonを初めて使い、WSDLを使ってデータを生成しようとしています。logger "suds.client"のハンドラが見つかりませんでした

>>> from suds.client import Client 
>>> client = Client('http://XXXXXXXXXXXXXXXXXXXXXXXXXX/datafeed.cfc?WSDL') 
>>> result = client.service.SalesDetailJSON(EventGUID='5789ADDC-6A64-E411-B196-0025B3A62EEE') 
No handlers could be found for logger "suds.client" 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "build/bdist.linux-x86_64/egg/suds/client.py", line 535, in __call__ 
    File "build/bdist.linux-x86_64/egg/suds/client.py", line 595, in invoke 
    File "build/bdist.linux-x86_64/egg/suds/client.py", line 630, in send 
    File "build/bdist.linux-x86_64/egg/suds/client.py", line 681, in failed 
    File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 230, in get_fault 
AttributeError: 'NoneType' object has no attribute 'getChild' 

私は印刷クライアントからの方法のいずれかを使用:

Service (DataFeedService) tns="http://XXXXXXXXXXXXXXX" 
     Prefixes (2) 
      ns0 = "http://rpc.xml.coldfusion" 
      ns1 = "http://schemas.xmlsoap.org/soap/encoding/" 
     Ports (1): 
      (datafeed.cfc) 
      Methods (2): 
       SalesDetail(xs:double Page, xs:double RecPP, xs:string EventGUID, xs:string LastUpdated, xs:boolean IncludeSurvey, xs:string SurveyKey,) 
       SalesDetailJSON(xs:string EventGUID, xs:string LastUpdated, xs:string NoFinancials,) 
      Types (49): 
       ........... 

私の目標は、すべての時間を変換して格納するXMLすることです。どんな助けでも大歓迎です!

答えて

0

このメッセージに乗るには、まずロガーをセットアップする必要があります。 https://fedorahosted.org/suds/wiki/Documentation#LOGGINGhttps://docs.python.org/2/library/logging.html(またはご使用のPythonのバージョンによってはhttps://docs.python.org/3/library/logging.html)をご覧ください。しかし、このようなものは問題を解決するはずです:

>>> import logging 
>>> from suds.client import Client 
>>> logging.getLogger('suds.client').setLevel(logging.DEBUG) 
>>> # ... 
関連する問題