--- a/eric6/DataViews/PyProfileDialog.py Tue Oct 13 19:02:26 2020 +0200 +++ b/eric6/DataViews/PyProfileDialog.py Wed Oct 14 17:50:39 2020 +0200 @@ -240,9 +240,8 @@ self.close() return try: - f = open(fname, 'rb') - self.stats = pickle.load(f) # secok - f.close() + with open(fname, 'rb') as f: + self.stats = pickle.load(f) # secok except (EnvironmentError, pickle.PickleError, EOFError): E5MessageBox.critical( self,