use absolute imports in lupa
remove unused import
clean up some imports
properly decode text of an exception raised on a safety check