remove code that raises an error

This solves the issue #1984