diff --git a/xfel_calibrate/calibrate.py b/xfel_calibrate/calibrate.py
index c97efc0526c3b2f7f2d1983d50e47994443d90cd..b865c1384e460b8a4b955dd4cc203e8db2cc3c1a 100755
--- a/xfel_calibrate/calibrate.py
+++ b/xfel_calibrate/calibrate.py
@@ -230,7 +230,6 @@ def make_epilog(nb, caltype=None):
 
 
 def get_notebook_function(nb, fname):
-    import re
     flines = []
     def_found = False
     indent = None
@@ -276,7 +275,6 @@ def balance_sequences(in_folder, run, sequences, sequences_per_node,
     :return: Balanced list of list of sequences
     """
     import glob
-    import re
     import numpy as np
     if sequences[0] == -1:
         path = "{}/r{:04d}/*{}-S*.h5".format(in_folder, run, path_inset)