diff --git a/PythonServer/screens/contacts.py b/PythonServer/screens/contacts.py index 632097a19271b7d452efe594fa22efc63f5ee1a6..eef1fe61fe2dd4d6cff590530f4165ad1f53f1b3 100755 --- a/PythonServer/screens/contacts.py +++ b/PythonServer/screens/contacts.py @@ -2,6 +2,7 @@ import epics import json import time import os +import sys import matplotlib.pyplot as plt from numpy import linspace, zeros from threading import Thread @@ -47,7 +48,8 @@ class contactsScreen(Thread): with open('/var/www/data/contacts.json','w') as datafile: # Write the final file datafile.write(tmp_json) except: - continue + print(sys.exc_info()) + time.sleep(1) time.sleep(0.5) # Refresh every half a second for pv in epics_dict: # When the stop signal is set, it cancels all the auto monitor and disconnects diff --git a/PythonServer/screens/instruments.py b/PythonServer/screens/instruments.py index d1878c3e58f93e4cc09376f583b1adf3f08b3151..51810f887ce9513cde9a760c67f36ddbb237a6f6 100755 --- a/PythonServer/screens/instruments.py +++ b/PythonServer/screens/instruments.py @@ -2,6 +2,7 @@ import epics import json import time import os +import sys import matplotlib.pyplot as plt from numpy import linspace, zeros, tile from threading import Thread @@ -193,7 +194,8 @@ class instrumentsScreen(Thread): datafile.write(tmp_json) except: - continue + print(sys.exc_info()) + time.sleep(1) time.sleep(0.5) for pv in epics_dict: diff --git a/PythonServer/screens/interlocks.py b/PythonServer/screens/interlocks.py index 82da388b720b751ec11f3a441033db59060616fb..11047f576fc5cb2370d328b45559e2f72cc5ab70 100755 --- a/PythonServer/screens/interlocks.py +++ b/PythonServer/screens/interlocks.py @@ -1,6 +1,7 @@ import epics import json import time +import sys from threading import Thread class interlocksScreen(Thread): @@ -38,7 +39,8 @@ class interlocksScreen(Thread): with open('/var/www/data/interlocks.json','w') as datafile: datafile.write(tmp_json) except: - continue + print(sys.exc_info()) + time.sleep(1) time.sleep(0.5) for pv in epics_dict: diff --git a/PythonServer/screens/pos.py b/PythonServer/screens/pos.py index 765b5c7cb36ee6722ae2b1758b71244921694ee8..0542617c0528bec5c8880486dd949f0929a20033 100755 --- a/PythonServer/screens/pos.py +++ b/PythonServer/screens/pos.py @@ -1,6 +1,7 @@ import epics import json import time +import sys from numpy import linspace from threading import Thread @@ -79,7 +80,8 @@ class posScreen(Thread): with open('/var/www/data/pos.json','w') as datafile: datafile.write(tmp_json) except: - continue + print(sys.exc_info()) + time.sleep(1) time.sleep(0.5) for pv in epics_dict: diff --git a/PythonServer/screens/ts2_cav.py b/PythonServer/screens/ts2_cav.py index 88e6e1fff968d7ebaefe324372f11eb7af18751a..a0d67000420368dcbef2d6f0e58107a3b636ad15 100755 --- a/PythonServer/screens/ts2_cav.py +++ b/PythonServer/screens/ts2_cav.py @@ -1,6 +1,7 @@ import epics import json import time +import sys from threading import Thread class ts2_cavScreen(Thread): @@ -39,7 +40,8 @@ class ts2_cavScreen(Thread): datafile.write(tmp_json) except: - continue + print(sys.exc_info()) + time.sleep(1) time.sleep(0.5) for pv in epics_dict: diff --git a/PythonServer/screens/ts2_screens.py b/PythonServer/screens/ts2_screens.py index 6850c93ec80890999c8439c0216dd69a08aca236..83085490846a76e27b6da4d10152960834d33ea4 100755 --- a/PythonServer/screens/ts2_screens.py +++ b/PythonServer/screens/ts2_screens.py @@ -1,6 +1,7 @@ import epics import json import time +import sys from threading import Thread class ts2_screensScreen(Thread): @@ -38,7 +39,8 @@ class ts2_screensScreen(Thread): with open('/var/www/data/ts2_screens.json','w') as datafile: datafile.write(tmp_json) except: - continue + print(sys.exc_info()) + time.sleep(1) time.sleep(0.5) for pv in epics_dict: diff --git a/PythonServer/screens/ts2_tpcircuits.py b/PythonServer/screens/ts2_tpcircuits.py index d369acc73bd70ddd3598f8b7c132002b1bf26656..c2a52037306fd17835f3d4a5e0a3f927b2bb163b 100755 --- a/PythonServer/screens/ts2_tpcircuits.py +++ b/PythonServer/screens/ts2_tpcircuits.py @@ -1,6 +1,7 @@ import epics import json import time +import sys from threading import Thread class ts2_tpcircuitsScreen(Thread): @@ -38,7 +39,8 @@ class ts2_tpcircuitsScreen(Thread): with open('/var/www/data/ts2_tpcircuits.json','w') as datafile: datafile.write(tmp_json) except: - continue + print(sys.exc_info()) + time.sleep(1) time.sleep(0.5) for pv in epics_dict: