carj/pyPreservica

Retention API - NoneType object has no attribute 'text'

Closed this issue · 1 comments

Hey, I'm getting an error using the API.

Traceback (most recent call last):
    for policy in retention. Policies():
                  ^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\pyPreservica\retentionAPI.py", line 412, in policies
    result.add(self.policy(reference=ref))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\pyPreservica\retentionAPI.py", line 99, in policy
    f'.//{{{self.rm_ns}}}RetentionPolicy/{{{self.rm_ns}}}ExpiryAction').text
                                                                        ^^^^
AttributeError: 'NoneType' object has no attribute 'text'

This also appeared when creating a new policy.

carj commented

I have published a new version

https://pypi.org/project/pyPreservica/1.7.0/

Can you upgrade to the new version and try again.

pip install pyPreservica --upgrade