I believe there is a bug with the accepts() method when using interactive.
I set up a repo here demonstrating the issue.
This is the error:
I believe what is happening is that accepts is attempting to iterate with an of statement here, but it gets back an object from choices() which cannot be iterated over with of (it could be iterated over with in, which would return the object's keys).