新しいBoxサポートサイトへようこそ。 変更点の詳細はこちらをご確認ください .

AttributeError: 'Client' object has no attribute 'get_retention_policies'

回答済み
新規投稿

コメント

4件のコメント

  • mwiller

     It looks like you're using the Box Python SDK — what version are you on?  That method was only added in v2.0.0, which was recently released.

    0
    コメントアクション Permalink
  • shynee

    Awesome. That was it. Running an older version of sdk. Did a pip upgrade and error went away. I have a follow up question.

     

    How do I access/iterate through this object ?

     

     

    Thanks Again.

    0
    コメントアクション Permalink
  • mwiller

     The Python SDK docs have examples for how to use most of the functions of the SDK — please refer to those.  In general, for API endpoints that return a collection, the SDK returns an iterator that you can use in a for-in loop or manually advance by calling next() on it.

    0
    コメントアクション Permalink
  • shynee

    I did try to iterate, but it was giving me an error. After closer inspection, I found my authentication needs higher privileges. 

     

    "error_description="The request requires higher privileges than provided by the access token."'

     

    Thanks again for the quick response. Really appreciated.

    0
    コメントアクション Permalink

サインインしてコメントを残してください。