MattParr / python-atws

Autotask Web Services python module
MIT License
32 stars 10 forks source link

suds_object.sd[0].types IndexError: list index out of range #54

Closed ChezDaniela closed 5 years ago

ChezDaniela commented 5 years ago

python3 test_atws_v1.py Traceback (most recent call last): File "test_atws_v1.py", line 14, in at = atws.connect(username='user',password='password',support_file_path='/tmp',url='https://webservices4.autotask.net/atservices/1.5/atws.wdsl') File "/usr/local/lib/python3.7/dist-packages/atws/wrapper.py", line 49, in connect monkeypatch.monkey_patch(wrapper) File "/usr/local/lib/python3.7/dist-packages/atws/monkeypatch/duckpunch.py", line 65, in call self._process_wrapper(wrapper) File "/usr/local/lib/python3.7/dist-packages/atws/monkeypatch/duckpunch.py", line 72, in _process_wrapper entity_classes = get_api_classes(wrapper.client,BLACKLISTED_TYPES) File "/usr/local/lib/python3.7/dist-packages/atws/monkeypatch/duckpunch.py", line 42, in get_api_classes objects = get_api_objects(suds_object, blacklist) File "/usr/local/lib/python3.7/dist-packages/atws/monkeypatch/duckpunch.py", line 37, in get_api_objects types = get_api_types(suds_object, blacklist) File "/usr/local/lib/python3.7/dist-packages/atws/monkeypatch/duckpunch.py", line 32, in get_api_types in suds_object.sd[0].types IndexError: list index out of range

I'd appreciate a pointer here. A bit stuck at this point.

MattParr commented 5 years ago

Would you mind trying a simple test in python 3.6? also... as the API doesn't really return authentication or authorisation as a soap error message, I've still not found a way to detect a bad password, username, or incorrect endpoint.

Try just using: at = atws.connect(username='user', password='password')

This will make the system do a lookup and give a better indication of authentication issues.

MattParr commented 5 years ago

Hi, I'll close this as I presume you got there.