model_publish.list_models() - AttributeError: 'PagedList' Object has no attribute 'get'
diemacre opened this issue · 1 comments
Describe the issue
when using latest version of python-sasctl 1.9.2 and in a viya 3.5 after creating a session when executing:
sasctl.services.model_publish.list_models()
Get the following error:
AttributeError: 'PagedList' Object has no attribute 'get'
However, if only use sasctl.services.model_publish.get("/models") it works
To Reproduce
Steps or example code to reproduce the issue.
import sasctl.services as s
from sasctl import Session
Session(server, user, name, pass)
s.model_publish.list_models()
Expected behavior
A clear and concise description of what you expected to happen.
it should return the list of the models published in the environment
Stack Trace
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[13], line 1 ----> 1 s.model_publish.list_models() File c:\Users....\AppData\Local\anaconda3\lib\site-packages\sasctl_services\model_publish.py:55, in ModelPublish.list_models(cls) 53 @classmethod 54 def list_models(cls): ---> 55 return cls.get("/models").get("items", []) AttributeError: 'PagedList' object has no attribute 'get'
Version
1.9.2
I have verified this fix for Viya 3.5 and Viya 4. The next release (today or tomorrow) will contain the fix.