diff --git a/pylatex/document.py b/pylatex/document.py
index <HASH>..<HASH> 100644
--- a/pylatex/document.py
+++ b/pylatex/document.py
@@ -238,7 +238,7 @@ class Document(Environment):
                     # Try latexmk cleaning first
                     subprocess.check_output(['latexmk', '-c', basename],
                                             stderr=subprocess.STDOUT)
-                except (OSError, IOError) as e:
+                except (OSError, IOError, subprocess.CalledProcessError) as e:
                     # Otherwise just remove some file extensions.
                     extensions = ['aux', 'log', 'out', 'fls',
                                   'fdb_latexmk']
Added error type to catch when cleaning after compilation to avoid error if latexmk is not installed/perl is not installed (Windows)