diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py
index caf98e75b81b743d67af51d89e643d08cf52947b..d300c52d9624d7de6a4b597cc7f18b90f2ccffaf 100644
--- a/src/caoscrawler/crawl.py
+++ b/src/caoscrawler/crawl.py
@@ -1457,6 +1457,7 @@ def main():
 
     if args.add_cwd_to_path:
         sys.path.append(os.path.abspath("."))
+    restrict_path = None
     if args.restrict_path:
         restricted_path = split_restricted_path(args.restrict_path)
     if args.restrict: