Join BoxWorks in San Francisco Nov 12-13! Keynotes, product demos, and Box Master Classes. Reserve your spot!

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

Answered
New post

Comments

4 comments

  • 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
    Comment actions 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
    Comment actions 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
    Comment actions 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
    Comment actions Permalink

Please sign in to leave a comment.