spacetelescope/pysiaf

IndexError when pulling latest PRD version

Closed this issue · 1 comments

When importing pysiaf, there's been an error reported a few times where in __init__.py the try/except clause fails on the newest_prd = line with the error IndexError: list index out of range. For examples of this failure, see spacetelescope/webbpsf#353 and spacetelescope/webbpsf#352

The fix for this should be to add a more general except clause that just prints a warning about being unable to check the PRD version, but not because of the internet connection.

One of the tests failing is using the released pysiaf version, so this will need to lead to a patch release.

We determined that the issue probably came from github being down at the time the import was called, so the code didn't have a connection error, but it also couldn't pull any PRD information. This is a problem we can prevent in the future by implementing the above change, but it's now less pressing and we don't have to do a whole patch release for it.