0

ここに記載されているソリューションに従っています-これはまさに私が達成する必要があるものです。

Python から (soap 経由で) sharepoint を使用するにはどうすればよいですか?

ただし、このコードの最後の行の 1 つを実行すると、次のエラーが発生します。

>>> client = SoapClient(url, {'opener' : opener})

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "build\bdist.win32\egg\suds\client.py", line 456, in __init__
AttributeError: 'str' object has no attribute 'options'

これを解決する方法についてのアドバイスや提案は大歓迎です!

4

1 に答える 1

1

https://fedorahosted.org/suds/browser/trunk/suds/client.py?rev=504によると

434     class SoapClient:
...
445         """
446     
447         def __init__(self, client, method):
448             """
449             @param client: A suds client.
450             @type client: L{Client}
451             @param method: A target method.
452             @type method: L{Method}
453             """
454             self.client = client
455             self.method = method
456             self.options = client.options
457             self.cookiejar = CookieJar()

の最初のパラメーターはクラスのオブジェクトでSoapClientstringなく、オブジェクトです。Clientパラメータが必要なクラスのインスタンスではありません。

于 2009-07-27T15:57:34.253 に答える