File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -491,8 +491,15 @@ def _get_current_data(self):
491491 raw_data = self ._fetch_data (self .h_offset , self .v_offset ,
492492 h_stop , v_stop )
493493 except Exception as e :
494- logger .error (f"could not fetch data from adapter:\n "
495- f"{ '' .join (format_exception (e ))} " )
494+ try :
495+ logger .error (f"could not fetch data from adapter:\n "
496+ f"{ '' .join (format_exception (e ))} " )
497+ except Exception :
498+ # sometimes the exception message itself contains unprintable
499+ # data (e.g. unicode string with characters which cannot be
500+ # encoded to the stderr encoding)
501+ logger .error ("could not fetch data from adapter "
502+ "(and cannot log exception)" )
496503 raw_data = np .array ([[]])
497504 if not isinstance (raw_data , dict ):
498505 raw_data = {'values' : raw_data }
You can’t perform that action at this time.
0 commit comments