diff --git a/code/python/src/main.py b/code/python/src/main.py
index 5852afb5c6bce7da9648a024e38638febed046b8..4cbce875e7a1c3ed340d305f8f22730abfb8521a 100644
--- a/code/python/src/main.py
+++ b/code/python/src/main.py
@@ -458,7 +458,10 @@ def monodepth_360(opt):
 
             line = line.splitlines()[0].split(" ")
             erp_image_filename = line[0]
-            erp_gtdepth_filename = line[1] if line[1] != 'None' else ""
+            if len(line) > 1:
+                erp_gtdepth_filename = line[1] if line[1] != 'None' else ""
+            else:
+                erp_gtdepth_filename = ""
 
             if "matterport" in erp_image_filename:
                 opt.dataset_matterport_hexagon_mask_enable = True