diff --git a/matweb/rest_api.py b/matweb/rest_api.py
index ef1a55a063fe37c344158d9b751f820d1e38d6f1..c8edead1b7ab07319f3516e0d2e1cd4995cd826e 100644
--- a/matweb/rest_api.py
+++ b/matweb/rest_api.py
@@ -68,7 +68,7 @@ class APIUpload(Resource):
                     _external=True
                 )
             ), 201
-        except (ValueError, RuntimeError) as e:
+        except (ValueError, RuntimeError):
             current_app.logger.error('Upload - Cleaning failed with mime: %s', mime)
             abort(400, message='Unable to clean %s' % mime)