mxcubecore 1.391.0__py3-none-any.whl → 1.393.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mxcubecore might be problematic. Click here for more details.

Files changed (91) hide show
  1. mxcubecore/BaseHardwareObjects.py +1 -1
  2. mxcubecore/Command/Epics.py +2 -2
  3. mxcubecore/Command/Pool.py +4 -4
  4. mxcubecore/Command/Sardana.py +7 -3
  5. mxcubecore/Command/Taco.py +2 -2
  6. mxcubecore/Command/Tango.py +2 -2
  7. mxcubecore/Command/Tine.py +1 -1
  8. mxcubecore/Command/exporter/ExporterClient.py +2 -2
  9. mxcubecore/Command/exporter/StandardClient.py +4 -3
  10. mxcubecore/HardwareObjects/ALBA/ALBABeamInfo.py +1 -1
  11. mxcubecore/HardwareObjects/ALBA/ALBACollect.py +2 -2
  12. mxcubecore/HardwareObjects/ALBA/ALBAFlux.py +1 -1
  13. mxcubecore/HardwareObjects/ALBA/ALBAISPyBClient.py +2 -2
  14. mxcubecore/HardwareObjects/ALBA/ALBAPilatus.py +1 -1
  15. mxcubecore/HardwareObjects/BeamInfo.py +1 -1
  16. mxcubecore/HardwareObjects/BlissHutchTrigger.py +2 -0
  17. mxcubecore/HardwareObjects/Cats90.py +3 -3
  18. mxcubecore/HardwareObjects/CatsBessy.py +2 -1
  19. mxcubecore/HardwareObjects/DESY/DigitalZoomMotor.py +2 -0
  20. mxcubecore/HardwareObjects/DESY/MjpgStreamVideo.py +4 -0
  21. mxcubecore/HardwareObjects/DESY/P11Collect.py +2 -0
  22. mxcubecore/HardwareObjects/DESY/P11EDNACharacterisation.py +12 -12
  23. mxcubecore/HardwareObjects/DESY/P11ISPyBClient.py +2 -2
  24. mxcubecore/HardwareObjects/DESY/P11NanoDiff.py +2 -0
  25. mxcubecore/HardwareObjects/EMBL/EMBLBeamFocusing.py +1 -1
  26. mxcubecore/HardwareObjects/EMBL/EMBLBeamlineTest.py +2 -0
  27. mxcubecore/HardwareObjects/EMBL/EMBLEnergyScan.py +3 -1
  28. mxcubecore/HardwareObjects/EMBL/EMBLFlux.py +1 -1
  29. mxcubecore/HardwareObjects/EMBL/TINEMotor.py +4 -2
  30. mxcubecore/HardwareObjects/ESRF/ESRFBeam.py +1 -1
  31. mxcubecore/HardwareObjects/ESRF/ESRFBeamlineActions.py +3 -2
  32. mxcubecore/HardwareObjects/ESRF/ESRFMetadataManagerClient.py +1 -1
  33. mxcubecore/HardwareObjects/ESRF/ID29HutchTrigger.py +2 -0
  34. mxcubecore/HardwareObjects/ESRF/MD2MultiCollect.py +1 -1
  35. mxcubecore/HardwareObjects/FlexHCDMaintenance.py +2 -1
  36. mxcubecore/HardwareObjects/GenericDiffractometer.py +21 -5
  37. mxcubecore/HardwareObjects/Gphl/GphlMessages.py +2 -1
  38. mxcubecore/HardwareObjects/Gphl/GphlWorkflow.py +1 -0
  39. mxcubecore/HardwareObjects/LNLS/LNLSCollect.py +2 -0
  40. mxcubecore/HardwareObjects/LNLS/LNLSPilatusDet.py +12 -0
  41. mxcubecore/HardwareObjects/LimaEigerDetector.py +1 -1
  42. mxcubecore/HardwareObjects/Marvin.py +2 -2
  43. mxcubecore/HardwareObjects/MicrodiffActuator.py +1 -1
  44. mxcubecore/HardwareObjects/MicrodiffBeamstop.py +3 -1
  45. mxcubecore/HardwareObjects/MicrodiffInOut.py +1 -1
  46. mxcubecore/HardwareObjects/MiniDiff.py +1 -1
  47. mxcubecore/HardwareObjects/MotorWPositions.py +2 -0
  48. mxcubecore/HardwareObjects/PlateManipulator.py +2 -2
  49. mxcubecore/HardwareObjects/QtGraphicsLib.py +2 -2
  50. mxcubecore/HardwareObjects/QtGraphicsManager.py +3 -3
  51. mxcubecore/HardwareObjects/QueueManager.py +3 -3
  52. mxcubecore/HardwareObjects/RedisClient.py +3 -3
  53. mxcubecore/HardwareObjects/SC3.py +2 -1
  54. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1BeamInfo.py +1 -1
  55. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Cryotong.py +1 -1
  56. mxcubecore/HardwareObjects/SOLEIL/PX1/PX1Pilatus.py +1 -1
  57. mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Collect.py +1 -1
  58. mxcubecore/HardwareObjects/SOLEIL/SOLEILISPyBClient.py +8 -8
  59. mxcubecore/HardwareObjects/SOLEIL/SOLEILRuche.py +1 -1
  60. mxcubecore/HardwareObjects/SOLEIL/TangoDCMotor.py +1 -1
  61. mxcubecore/HardwareObjects/Session.py +2 -1
  62. mxcubecore/HardwareObjects/SpecShell.py +6 -6
  63. mxcubecore/HardwareObjects/SpecState.py +1 -1
  64. mxcubecore/HardwareObjects/TangoLimaMpegVideo.py +1 -1
  65. mxcubecore/HardwareObjects/TangoMotor.py +3 -1
  66. mxcubecore/HardwareObjects/UserTypeISPyBLims.py +4 -2
  67. mxcubecore/HardwareObjects/XMLRPCServer.py +2 -2
  68. mxcubecore/HardwareObjects/abstract/AbstractCollect.py +1 -1
  69. mxcubecore/HardwareObjects/abstract/AbstractMultiCollect.py +6 -6
  70. mxcubecore/HardwareObjects/abstract/AbstractNState.py +2 -1
  71. mxcubecore/HardwareObjects/abstract/AbstractVideoDevice.py +2 -2
  72. mxcubecore/HardwareObjects/abstract/AbstractXRFSpectrum.py +2 -0
  73. mxcubecore/HardwareObjects/abstract/ISPyBAbstractLims.py +5 -5
  74. mxcubecore/HardwareObjects/abstract/ISPyBDataAdapter.py +3 -3
  75. mxcubecore/HardwareObjects/abstract/sample_changer/Crims.py +8 -0
  76. mxcubecore/HardwareObjects/mockup/BeamlineTestMockup.py +2 -0
  77. mxcubecore/HardwareObjects/mockup/EnergyScanMockup.py +1 -1
  78. mxcubecore/HardwareObjects/mockup/ISPyBClientMockup.py +1 -1
  79. mxcubecore/HardwareObjects/mockup/ISPyBRestClientMockup.py +1 -1
  80. mxcubecore/HardwareObjects/mockup/MDCameraMockup.py +1 -1
  81. mxcubecore/HardwareObjects/mockup/MicrodiffInOutMockup.py +1 -1
  82. mxcubecore/TaskUtils.py +2 -0
  83. mxcubecore/queue_entry/base_queue_entry.py +2 -2
  84. mxcubecore/queue_entry/energy_scan.py +1 -1
  85. mxcubecore/saferef.py +2 -1
  86. mxcubecore/utils/qt_import.py +8 -7
  87. {mxcubecore-1.391.0.dist-info → mxcubecore-1.393.0.dist-info}/METADATA +1 -1
  88. {mxcubecore-1.391.0.dist-info → mxcubecore-1.393.0.dist-info}/RECORD +91 -91
  89. {mxcubecore-1.391.0.dist-info → mxcubecore-1.393.0.dist-info}/COPYING +0 -0
  90. {mxcubecore-1.391.0.dist-info → mxcubecore-1.393.0.dist-info}/COPYING.LESSER +0 -0
  91. {mxcubecore-1.391.0.dist-info → mxcubecore-1.393.0.dist-info}/WHEEL +0 -0
@@ -486,7 +486,7 @@ class HardwareObjectNode:
486
486
  try:
487
487
  index = self.__objects_names.index(object_name)
488
488
  except ValueError:
489
- pass
489
+ logging.getLogger("HWR").exception("")
490
490
  else:
491
491
  for obj in self.__objects[index]:
492
492
  yield obj
@@ -141,7 +141,7 @@ class EpicsCommand(CommandObject):
141
141
  try:
142
142
  callback = self.__value_changed_callback_ref()
143
143
  except Exception:
144
- pass
144
+ logging.getLogger("HWR").exception("")
145
145
  else:
146
146
  if callback is not None:
147
147
  callback(value)
@@ -155,7 +155,7 @@ class EpicsCommand(CommandObject):
155
155
  try:
156
156
  poller.restart(1000)
157
157
  except Exception:
158
- pass
158
+ logging.getLogger("HWR").exception("")
159
159
 
160
160
  def get_pv_value(self):
161
161
  """wrapper function to pv.get() in order to supply additional named parameter"""
@@ -141,9 +141,9 @@ def process_tango_events():
141
141
  try:
142
142
  receiver_cb(event.attr_value.value)
143
143
  except AttributeError:
144
- pass
144
+ logging.getLogger("HWR").exception("")
145
145
  except KeyError:
146
- pass
146
+ logging.getLogger("HWR").exception("")
147
147
 
148
148
 
149
149
  class PoolChannel(ChannelObject):
@@ -217,7 +217,7 @@ class PoolChannel(ChannelObject):
217
217
  self.attribute_name, PyTango.EventType.CHANGE, self, []
218
218
  )
219
219
  except PyTango.EventSystemFailed:
220
- pass
220
+ logging.getLogger("HWR").exception("")
221
221
 
222
222
  def push_event(self, event):
223
223
  PoolChannel._eventReceivers[id(event)] = BoundMethodWeakref(self.update)
@@ -250,7 +250,7 @@ class PoolChannel(ChannelObject):
250
250
  try:
251
251
  s = self.device.State()
252
252
  except Exception:
253
- pass
253
+ logging.getLogger("HWR").exception("")
254
254
  else:
255
255
  if s == PyTango.DevState.OFF:
256
256
  return
@@ -84,9 +84,9 @@ def processSardanaEvents():
84
84
  try:
85
85
  gevent.spawn(receiver_cb, ev)
86
86
  except AttributeError:
87
- pass
87
+ logging.getLogger("HWR").exception("")
88
88
  except KeyError:
89
- pass
89
+ logging.getLogger("HWR").exception("")
90
90
 
91
91
 
92
92
  def wait_end_of_command(cmdobj):
@@ -188,6 +188,8 @@ class SardanaMacro(CommandObject, SardanaObject, ChannelObject):
188
188
  " - Wrong format for macro arguments. Macro is %s / args are (%s)"
189
189
  % (self.macro_format, str(args))
190
190
  )
191
+
192
+ logging.getLogger("HWR").exception("")
191
193
  return
192
194
 
193
195
  try:
@@ -399,6 +401,8 @@ class SardanaChannel(ChannelObject, SardanaObject):
399
401
  self.attribute = Attribute(self.model)
400
402
  except DevFailed as traceback:
401
403
  self.imported = False
404
+
405
+ logging.getLogger("HWR").exception("")
402
406
  return
403
407
 
404
408
  # read information
@@ -471,7 +475,7 @@ class SardanaChannel(ChannelObject, SardanaObject):
471
475
  self.emit("update", self.value)
472
476
  except AttributeError:
473
477
  # No value in data... this is probably a connection error
474
- pass
478
+ logging.getLogger("HWR").exception("")
475
479
 
476
480
  def is_connected(self):
477
481
  return self.attribute is not None
@@ -104,7 +104,7 @@ class TacoCommand(CommandObject):
104
104
  try:
105
105
  callback = self.__value_changed_callback_ref()
106
106
  except Exception:
107
- pass
107
+ logging.getLogger("HWR").exception("")
108
108
  else:
109
109
  if callback is not None:
110
110
  callback(device_name, value)
@@ -116,7 +116,7 @@ class TacoCommand(CommandObject):
116
116
  try:
117
117
  poller.restart(1000)
118
118
  except Exception:
119
- pass
119
+ logging.getLogger("HWR").exception("")
120
120
 
121
121
  def poll(
122
122
  self,
@@ -133,9 +133,9 @@ def process_tango_events():
133
133
  try:
134
134
  gevent.spawn(receiverCb, ev.event.attr_value.value)
135
135
  except AttributeError:
136
- pass
136
+ logging.getLogger("HWR").exception("")
137
137
  except KeyError:
138
- pass
138
+ logging.getLogger("HWR").exception("")
139
139
 
140
140
 
141
141
  class E:
@@ -82,7 +82,7 @@ class TineCommand(CommandObject):
82
82
  except IOError as strerror:
83
83
  logging.getLogger("HWR").error("%s" % strerror)
84
84
  except Exception:
85
- pass
85
+ logging.getLogger("HWR").exception("")
86
86
  return result
87
87
 
88
88
  def abort(self):
@@ -59,7 +59,7 @@ class ExporterClient(StandardClient):
59
59
  tokens = msg[4:].split(PARAMETER_SEPARATOR)
60
60
  self.on_event(tokens[0], tokens[1], int(tokens[2]))
61
61
  except Exception:
62
- pass
62
+ logging.getLogger("HWR").exception("")
63
63
  else:
64
64
  StandardClient.on_message_received(self, msg)
65
65
 
@@ -187,7 +187,7 @@ class ExporterClient(StandardClient):
187
187
  try:
188
188
  process_return = self.__process_return(ret)
189
189
  except Exception:
190
- pass
190
+ logging.getLogger("HWR").exception("")
191
191
  return process_return
192
192
 
193
193
  def read_property_as_string_array(self, prop):
@@ -20,6 +20,7 @@
20
20
 
21
21
  """ProtocolError and StandardClient implementation"""
22
22
 
23
+ import logging
23
24
  import socket
24
25
  import sys
25
26
 
@@ -109,7 +110,7 @@ class StandardClient:
109
110
  try:
110
111
  self.__sock.close()
111
112
  except Exception:
112
- pass
113
+ logging.getLogger("HWR").exception("")
113
114
  self._is_connected = False
114
115
  self.__sock = None
115
116
  self.received_msg = None
@@ -249,7 +250,7 @@ class StandardClient:
249
250
  try:
250
251
  self.on_connected()
251
252
  except Exception:
252
- pass
253
+ logging.getLogger("HWR").exception("")
253
254
  buffer = empty_buffer()
254
255
  mReceivedSTX = False
255
256
  while True:
@@ -288,7 +289,7 @@ class StandardClient:
288
289
  try:
289
290
  self.on_disconnected()
290
291
  except Exception:
291
- pass
292
+ logging.getLogger("HWR").exception("")
292
293
 
293
294
  def __send_stream(self, cmd):
294
295
  """Send a command.
@@ -78,7 +78,7 @@ class ALBABeamInfo(HardwareObject):
78
78
  self.get_property("beam_divergence_horizontal")
79
79
  )
80
80
  except Exception:
81
- pass
81
+ logging.getLogger("HWR").exception("")
82
82
 
83
83
  self.default_beam_divergence = [
84
84
  default_beam_divergence_horizontal,
@@ -85,7 +85,7 @@ class ALBACollect(AbstractCollect):
85
85
  for undulator in self["undulators"]:
86
86
  undulators.append(undulator)
87
87
  except Exception:
88
- pass
88
+ logging.getLogger("HWR").exception("")
89
89
 
90
90
  self.exp_type_dict = {"Mesh": "raster", "Helical": "Helical"}
91
91
 
@@ -815,7 +815,7 @@ class ALBACollect(AbstractCollect):
815
815
  else:
816
816
  return und_gaps
817
817
  except Exception:
818
- pass
818
+ logging.getLogger("HWR").exception("")
819
819
  return {}
820
820
 
821
821
  def get_slit_gaps(self):
@@ -19,7 +19,7 @@ class ALBAFlux(Device, AbstractFlux.AbstractFlux):
19
19
  if fluxlast > 1e7:
20
20
  return self.last_current_trans()
21
21
  except Exception:
22
- pass
22
+ logging.getLogger("HWR").exception("")
23
23
 
24
24
  logging.getLogger("HWR").debug(
25
25
  " Abnormally low value of flux. Returning default value"
@@ -60,7 +60,7 @@ class ALBAISPyBClient(ProposalISPyBClient):
60
60
  logging.debug("ALBA ISPyBClient - %s is %s " % (prop, ispyb_path))
61
61
  mx_collect_dict[prop] = ispyb_path
62
62
  except Exception:
63
- pass
63
+ logging.getLogger("HWR").exception("")
64
64
 
65
65
  def prepare_image_for_lims(self, image_dict):
66
66
  for prop in ["jpegThumbnailFileFullPath", "jpegFileFullPath"]:
@@ -69,7 +69,7 @@ class ALBAISPyBClient(ProposalISPyBClient):
69
69
  ispyb_path = HWR.beamline.session.path_to_ispyb(path)
70
70
  image_dict[prop] = ispyb_path
71
71
  except Exception:
72
- pass
72
+ logging.getLogger("HWR").exception("")
73
73
 
74
74
 
75
75
  def test_hwo(hwo):
@@ -112,7 +112,7 @@ class ALBAPilatus(AbstractDetector, HardwareObject):
112
112
  beam_x = self.beamx_chan.get_value()
113
113
  beam_y = self.beamy_chan.get_value()
114
114
  except Exception:
115
- pass
115
+ logging.getLogger("HWR").exception("")
116
116
  return beam_x, beam_y
117
117
 
118
118
  def get_manufacturer(self):
@@ -91,7 +91,7 @@ class BeamInfo(HardwareObject):
91
91
  self.get_property("beam_divergence_horizontal")
92
92
  )
93
93
  except Exception:
94
- pass
94
+ logging.getLogger("HWR").exception("")
95
95
  self.default_beam_divergence = [
96
96
  default_beam_divergence_horizontal,
97
97
  default_beam_divergence_vertical,
@@ -60,6 +60,8 @@ class BlissHutchTrigger(BaseHardwareObjects.HardwareObject):
60
60
  self.card, self.channel = map(int, PSSinfo.split("/"))
61
61
  except Exception:
62
62
  logging.getLogger().error("%s: cannot find PSS number", self.name())
63
+
64
+ logging.getLogger("HWR").exception("")
63
65
  return
64
66
 
65
67
  if self.device is not None:
@@ -429,7 +429,7 @@ class Cats90(SampleChanger):
429
429
  self.basket_types = self.cats_device.read_attribute("CassetteType").value
430
430
  self.number_of_baskets = len(self.basket_types)
431
431
  except PyTango.DevFailed:
432
- pass
432
+ logging.getLogger("HWR").exception("")
433
433
 
434
434
  # find number of baskets and number of samples per basket
435
435
  if self.number_of_baskets is not None:
@@ -539,7 +539,7 @@ class Cats90(SampleChanger):
539
539
  if unipuck_tool:
540
540
  self.set_unipuck_tool(unipuck_tool)
541
541
  except Exception:
542
- pass
542
+ logging.getLogger("HWR").exception("")
543
543
 
544
544
  self.update_info()
545
545
 
@@ -690,7 +690,7 @@ class Cats90(SampleChanger):
690
690
  Pin.get_sample_address(basket_no, sample_no)
691
691
  )
692
692
  except Exception:
693
- pass
693
+ logging.getLogger("HWR").exception("")
694
694
  self._set_selected_component(basket)
695
695
  self._set_selected_sample(sample)
696
696
 
@@ -1,3 +1,4 @@
1
+ import logging
1
2
  import time
2
3
 
3
4
  from mxcubecore.HardwareObjects.abstract.AbstractSampleChanger import (
@@ -371,7 +372,7 @@ class CatsBessy(SampleChanger):
371
372
  Pin.get_sample_address(basket_no, sample_no)
372
373
  )
373
374
  except Exception:
374
- pass
375
+ logging.getLogger("HWR").exception("")
375
376
  self._set_selected_component(basket)
376
377
  self._set_selected_sample(sample)
377
378
 
@@ -55,6 +55,8 @@ class DigitalZoomMotor(AbstractMotor, HardwareObject):
55
55
  self.camera = self.get_object_by_role("camera")
56
56
  except KeyError:
57
57
  logging.getLogger("HWR").warning("DigitalZoomMotor: camera not defined")
58
+
59
+ logging.getLogger("HWR").exception("")
58
60
  return
59
61
  try:
60
62
  self.read_only = not (self.camera.zoom_exists())
@@ -1,3 +1,5 @@
1
+ import logging
2
+
1
3
  # encoding: utf-8
2
4
  #
3
5
  # Project name: MXCuBE
@@ -375,6 +377,8 @@ class MjpgStreamVideo(AbstractVideoDevice):
375
377
  host, port, path, query
376
378
  )
377
379
  )
380
+
381
+ logging.getLogger("HWR").exception("")
378
382
  return None
379
383
  if response.status != 200:
380
384
  self.log.error(
@@ -1137,6 +1137,8 @@ class P11Collect(AbstractCollect):
1137
1137
  os.mkdir(path, mode=0o777)
1138
1138
  except RuntimeError:
1139
1139
  self.log.debug("mkdir failed:", str(sys.exc_info()))
1140
+
1141
+ logging.getLogger("HWR").exception("")
1140
1142
  return False
1141
1143
  else:
1142
1144
  self.log.debug("dir not found:", str(sys.exc_info()))
@@ -255,20 +255,20 @@ class P11EDNACharacterisation(EDNACharacterisation):
255
255
  wavelength = HWR.beamline.energy.get_wavelength()
256
256
  beam.setWavelength(XSDataWavelength(wavelength))
257
257
  except AttributeError:
258
- pass
258
+ logging.getLogger("HWR").exception("")
259
259
 
260
260
  try:
261
261
  # Flux get_value() subsequently executing measure_flux() to fill in the dictionary
262
262
 
263
263
  beam.setFlux(XSDataFlux(HWR.beamline.flux.get_value()))
264
264
  except AttributeError:
265
- pass
265
+ logging.getLogger("HWR").exception("")
266
266
 
267
267
  try:
268
268
  min_exp_time = self.collect_obj.detector_hwobj.get_exposure_time_limits()[0]
269
269
  beam.setMinExposureTimePerImage(XSDataTime(min_exp_time))
270
270
  except AttributeError:
271
- pass
271
+ logging.getLogger("HWR").exception("")
272
272
 
273
273
  try:
274
274
  beamsize = self.collect_obj.beam_info_hwobj.get_beam_size()
@@ -281,7 +281,7 @@ class P11EDNACharacterisation(EDNACharacterisation):
281
281
  )
282
282
  )
283
283
  except AttributeError:
284
- pass
284
+ logging.getLogger("HWR").exception("")
285
285
 
286
286
  # Optimization parameters
287
287
  diff_plan = edna_input.getDiffractionPlan()
@@ -476,7 +476,7 @@ class P11EDNACharacterisation(EDNACharacterisation):
476
476
  collection_plan = edna_strategy.getCollectionPlan()[0]
477
477
  wedges = collection_plan.getCollectionStrategy().getSubWedge()
478
478
  except Exception:
479
- pass
479
+ logging.getLogger("HWR").exception("")
480
480
  else:
481
481
  try:
482
482
  resolution = (
@@ -558,7 +558,7 @@ class P11EDNACharacterisation(EDNACharacterisation):
558
558
  goniostat.getRotationAxisStart().getValue()
559
559
  )
560
560
  except AttributeError:
561
- pass
561
+ logging.getLogger("HWR").exception("")
562
562
  """ GB:
563
563
  try:
564
564
  acquisition_parameters.osc_end = (
@@ -574,7 +574,7 @@ class P11EDNACharacterisation(EDNACharacterisation):
574
574
  goniostat.getOscillationWidth().getValue()
575
575
  )
576
576
  except AttributeError:
577
- pass
577
+ logging.getLogger("HWR").exception("")
578
578
 
579
579
  try:
580
580
  num_images = int(
@@ -591,26 +591,26 @@ class P11EDNACharacterisation(EDNACharacterisation):
591
591
  acq.path_template.start_num = 1
592
592
 
593
593
  except AttributeError:
594
- pass
594
+ logging.getLogger("HWR").exception("")
595
595
 
596
596
  try:
597
597
  acquisition_parameters.transmission = (
598
598
  beam.getTransmission().getValue()
599
599
  )
600
600
  except AttributeError:
601
- pass
601
+ logging.getLogger("HWR").exception("")
602
602
 
603
603
  try:
604
604
  acquisition_parameters.energy = round(
605
605
  (123_984.0 / beam.getWavelength().getValue()) / 10000.0, 4
606
606
  )
607
607
  except AttributeError:
608
- pass
608
+ logging.getLogger("HWR").exception("")
609
609
 
610
610
  try:
611
611
  acquisition_parameters.exp_time = beam.getExposureTime().getValue()
612
612
  except AttributeError:
613
- pass
613
+ logging.getLogger("HWR").exception("")
614
614
 
615
615
  dc = qmo.DataCollection([acq], crystal, processing_parameters)
616
616
  data_collections.append(dc)
@@ -652,6 +652,6 @@ class P11EDNACharacterisation(EDNACharacterisation):
652
652
  html_report = html_report.replace("/beamline/p11", "/gpfs")
653
653
 
654
654
  except AttributeError:
655
- pass
655
+ logging.getLogger("HWR").exception("")
656
656
 
657
657
  return html_report
@@ -106,7 +106,7 @@ class P11ISPyBClient(ProposalISPyBClient):
106
106
  logging.debug("P11 ISPyBClient - %s is %s " % (prop, ispyb_path))
107
107
  mx_collect_dict[prop] = ispyb_path
108
108
  except RuntimeWarning("Can not get ISPyB path for %s" % prop):
109
- pass
109
+ logging.getLogger("HWR").exception("")
110
110
 
111
111
  def prepare_image_for_lims(self, image_dict):
112
112
  for prop in ["jpegThumbnailFileFullPath", "jpegFileFullPath"]:
@@ -115,7 +115,7 @@ class P11ISPyBClient(ProposalISPyBClient):
115
115
  ispyb_path = HWR.beamline.session.path_to_ispyb(path)
116
116
  image_dict[prop] = ispyb_path
117
117
  except RuntimeWarning("Can not prepare image path fir LIMS for %s" % prop):
118
- pass
118
+ logging.getLogger("HWR").exception("")
119
119
 
120
120
  def get_proposal(self, proposal_code, proposal_number):
121
121
  logging.getLogger("HWR").debug(
@@ -1473,6 +1473,8 @@ class P11NanoDiff(GenericDiffractometer):
1473
1473
  self.log.rror(
1474
1474
  "motor_positions is not a dict and cannot be converted using as_dict()"
1475
1475
  )
1476
+
1477
+ logging.getLogger("HWR").exception("")
1476
1478
  return
1477
1479
 
1478
1480
  # Move translation motors
@@ -96,7 +96,7 @@ class EMBLBeamFocusing(HardwareObject):
96
96
  try:
97
97
  self.cmd_set_phase = eval(self.get_property("setPhaseCmd"))
98
98
  except Exception:
99
- pass
99
+ logging.getLogger("HWR").exception("")
100
100
 
101
101
  self.aperture_hwobj = self.get_object_by_role("aperture")
102
102
 
@@ -116,6 +116,8 @@ class EMBLBeamlineTest(HardwareObject):
116
116
  logging.getLogger("HWR").warning(
117
117
  "BeamlineTest: Unable to create test directories"
118
118
  )
119
+
120
+ logging.getLogger("HWR").exception("")
119
121
  return
120
122
 
121
123
  self.results_list = []
@@ -377,6 +377,8 @@ class EMBLEnergyScan(AbstractEnergyScan, HardwareObject):
377
377
  self.store_energy_scan()
378
378
 
379
379
  logging.getLogger("GUI").error("Energy scan: Chooch failed")
380
+
381
+ logging.getLogger("HWR").exception("")
380
382
  return None, None, None, None, None, None, None, [], [], [], None
381
383
 
382
384
  rm = (pk + 30) / 1000.0
@@ -514,7 +516,7 @@ class EMBLEnergyScan(AbstractEnergyScan, HardwareObject):
514
516
  }
515
517
  )
516
518
  except IndexError:
517
- pass
519
+ logging.getLogger("HWR").exception("")
518
520
  return elements
519
521
 
520
522
  def get_scan_data(self):
@@ -428,7 +428,7 @@ class EMBLFlux(AbstractFlux):
428
428
  self.cmd_flux_record([_x["flux"] for _x in self.measured_flux_list])
429
429
  gevent.sleep(2)
430
430
  except Exception:
431
- pass
431
+ logging.getLogger("HWR").exception("")
432
432
 
433
433
  max_frame_rate = 25
434
434
  else:
@@ -19,6 +19,8 @@
19
19
 
20
20
  """TINEMotor class defines motor in the TINE control system"""
21
21
 
22
+ import logging
23
+
22
24
  import gevent
23
25
 
24
26
  from mxcubecore.BaseHardwareObjects import HardwareObjectState
@@ -63,7 +65,7 @@ class TINEMotor(AbstractMotor):
63
65
  if self.get_property("default_limits"):
64
66
  self.update_limits(eval(self.get_property("default_limits")))
65
67
  except Exception:
66
- pass
68
+ logging.getLogger("HWR").exception("")
67
69
 
68
70
  self.chan_position = self.get_channel_object("axisPosition")
69
71
  if self.chan_position is not None:
@@ -92,7 +94,7 @@ class TINEMotor(AbstractMotor):
92
94
  try:
93
95
  self.step_limits = eval(self.get_property("stepLimits"))
94
96
  except Exception:
95
- pass
97
+ logging.getLogger("HWR").exception("")
96
98
 
97
99
  def connected(self):
98
100
  """
@@ -398,4 +398,4 @@ class ESRFBeam(AbstractBeam):
398
398
  if self._monitorbeam_obj.get_value().value:
399
399
  self._beam_check_obj.wait_for_beam(timeout)
400
400
  except AttributeError:
401
- pass
401
+ logging.getLogger("HWR").exception("")
@@ -36,6 +36,7 @@ Example xml file:
36
36
  """
37
37
 
38
38
  import ast
39
+ import logging
39
40
 
40
41
  from mxcubecore.HardwareObjects.BeamlineActions import (
41
42
  BeamlineActions,
@@ -69,7 +70,7 @@ class ESRFBeamlineActions(BeamlineActions):
69
70
  action = getattr(controller, key)
70
71
  self.ctrl_list.append(ControllerCommand(name, action))
71
72
  except KeyError:
72
- pass
73
+ logging.getLogger("HWR").exception("")
73
74
 
74
75
  try:
75
76
  hwobj_cmd_roles = ast.literal_eval(
@@ -86,7 +87,7 @@ class ESRFBeamlineActions(BeamlineActions):
86
87
  except:
87
88
  pass
88
89
  except AttributeError:
89
- pass
90
+ logging.getLogger("HWR").exception("")
90
91
 
91
92
  def get_commands(self):
92
93
  """Get which objects to be used in the GUI
@@ -253,7 +253,7 @@ class MXCuBEMetadataClient(object):
253
253
  )
254
254
  smtp.quit()
255
255
  except Exception:
256
- pass
256
+ logging.getLogger("HWR").exception("")
257
257
  return errorMessage
258
258
 
259
259
  def start(self, data_collect_parameters):
@@ -42,6 +42,8 @@ class ID29HutchTrigger(BaseHardwareObjects.HardwareObject):
42
42
  self.card, self.channel = map(int, PSSinfo.split("/"))
43
43
  except Exception:
44
44
  logging.getLogger().error("%s: cannot find PSS number", self.name())
45
+
46
+ logging.getLogger("HWR").exception("")
45
47
  return
46
48
 
47
49
  if self.device is not None:
@@ -22,7 +22,7 @@ class MD2MultiCollect(ESRFMultiCollect):
22
22
  comment = HWR.beamline.sample_changer.get_crystal_id()
23
23
  data_collect_parameters["comment"] = comment
24
24
  except Exception:
25
- pass
25
+ logging.getLogger("HWR").exception("")
26
26
 
27
27
  @task
28
28
  def get_beam_size(self):
@@ -3,6 +3,7 @@ FLEX HCD maintenance mockup.
3
3
  """
4
4
 
5
5
  import ast
6
+ import logging
6
7
 
7
8
  from mxcubecore.BaseHardwareObjects import HardwareObject
8
9
 
@@ -159,7 +160,7 @@ class FlexHCDMaintenance(HardwareObject):
159
160
  try:
160
161
  grippers = self._sc.get_available_grippers()
161
162
  except Exception:
162
- pass
163
+ logging.getLogger("HWR").exception("")
163
164
  else:
164
165
  gripper_cmd_list = []
165
166