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.
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
@@ -363,7 +363,7 @@ class GenericDiffractometer(HardwareObject):
363
363
  try:
364
364
  self.used_channels_list = eval(ss0)
365
365
  except Exception:
366
- pass # used the default value
366
+ logging.getLogger("HWR").exception("")
367
367
 
368
368
  for channel_name in self.used_channels_list:
369
369
  self.channel_dict[channel_name] = self.get_channel_object(channel_name)
@@ -392,7 +392,7 @@ class GenericDiffractometer(HardwareObject):
392
392
  try:
393
393
  self.used_commands_list = eval(self.get_property("used_commands", "[]"))
394
394
  except Exception:
395
- pass # used the default value
395
+ logging.getLogger("HWR").exception("")
396
396
  for command_name in self.used_commands_list:
397
397
  self.command_dict[command_name] = self.get_command_object(command_name)
398
398
 
@@ -479,12 +479,12 @@ class GenericDiffractometer(HardwareObject):
479
479
  self.motor_hwobj_dict["sampy"]
480
480
  )
481
481
  except Exception:
482
- pass # used the default value
482
+ logging.getLogger("HWR").exception("")
483
483
 
484
484
  try:
485
485
  self.delay_state_polling = self.get_property("delay_state_polling")
486
486
  except Exception:
487
- pass
487
+ logging.getLogger("HWR").exception("")
488
488
 
489
489
  # Other parameters ---------------------------------------------------
490
490
  try:
@@ -610,6 +610,22 @@ class GenericDiffractometer(HardwareObject):
610
610
  """
611
611
  return self.motor_hwobj_dict.get("phiz")
612
612
 
613
+ @property
614
+ def zoom(self):
615
+ """zoom motor object
616
+
617
+ NBNB TBD This is supposedly now living in AbstractSampleView,
618
+ And the property was removed in an earlier PR (20251021, 15:24 Elmir Jagudin)
619
+ BUT 1) there does not seem to be any mechanism to set it from config there
620
+ 2) it is configured on the diffractometer according to available config files
621
+ 3) accessing diffractometer.zoom is all through the code
622
+ This needs global refactoring, but meanwhile this property should remain
623
+
624
+ Returns:
625
+ AbstractActuator
626
+ """
627
+ return self.motor_hwobj_dict.get("zoom")
628
+
613
629
  def is_ready(self):
614
630
  """
615
631
  Detects if device is ready
@@ -1396,7 +1412,7 @@ class GenericDiffractometer(HardwareObject):
1396
1412
  self.sample_is_loaded_changed,
1397
1413
  )
1398
1414
  except Exception:
1399
- pass
1415
+ logging.getLogger("HWR").exception("")
1400
1416
 
1401
1417
  if (
1402
1418
  head_type == GenericDiffractometer.HEAD_TYPE_MINIKAPPA
@@ -1310,7 +1310,8 @@ class SampleCentred(Payload):
1310
1310
  self._wavelengths = tuple((data_model.wavelengths[0],))
1311
1311
  # if data_model.wftype != "diffractcal":
1312
1312
  # self._detectorSetting = data_model.detector_setting
1313
- self._detectorSetting = data_model.detector_setting
1313
+ if data_model.wftype != "diffractcal":
1314
+ self._detectorSetting = data_model.detector_setting
1314
1315
 
1315
1316
  @property
1316
1317
  def imageWidth(self):
@@ -844,6 +844,7 @@ class GphlWorkflow(HardwareObject):
844
844
  HWR.beamline.gphl_connection.open_connection()
845
845
 
846
846
  if data_model.wftype == "transcal":
847
+ self._workflow_queue = gevent.queue.Queue()
847
848
  return
848
849
  elif data_model.automation_mode:
849
850
  params = data_model.auto_acq_parameters[0]
@@ -262,6 +262,8 @@ class LNLSCollect(AbstractMultiCollect, HardwareObject):
262
262
  ft = ft / 100 # [0, 1]
263
263
  except Exception as e:
264
264
  print("Error on setting Pilatus transmission: {}".format(str(e)))
265
+
266
+ logging.getLogger("HWR").exception("")
265
267
  return False
266
268
 
267
269
  # Write to det (values will be on the cbf header)
@@ -119,6 +119,8 @@ class LNLSPilatusDet(AbstractDetector):
119
119
  logging.getLogger("HWR").error(
120
120
  "Error while setting Pilatus threshold. Value must be float."
121
121
  )
122
+
123
+ logging.getLogger("HWR").exception("")
122
124
  return False
123
125
 
124
126
  target_threshold = energy / 2
@@ -178,6 +180,8 @@ class LNLSPilatusDet(AbstractDetector):
178
180
  logging.getLogger("HWR").error(
179
181
  "Error while setting Pilatus wavelength. Value must be float."
180
182
  )
183
+
184
+ logging.getLogger("HWR").exception("")
181
185
  return False
182
186
 
183
187
  # if abs(self.wavelength - wavelength) < 0.0001:
@@ -223,6 +227,8 @@ class LNLSPilatusDet(AbstractDetector):
223
227
  logging.getLogger("HWR").error(
224
228
  "Error while setting Pilatus det distance. Value must be float."
225
229
  )
230
+
231
+ logging.getLogger("HWR").exception("")
226
232
  return False
227
233
 
228
234
  # if abs(self.det_distance - det_distance) < 0.001:
@@ -380,6 +386,8 @@ class LNLSPilatusDet(AbstractDetector):
380
386
  logging.getLogger("HWR").error(
381
387
  "Error while setting Pilatus transmission. Value must be float."
382
388
  )
389
+
390
+ logging.getLogger("HWR").exception("")
383
391
  return False
384
392
 
385
393
  logging.getLogger("HWR").info(
@@ -417,6 +425,8 @@ class LNLSPilatusDet(AbstractDetector):
417
425
  logging.getLogger("HWR").error(
418
426
  "Error while setting Pilatus start angle. Value must be float."
419
427
  )
428
+
429
+ logging.getLogger("HWR").exception("")
420
430
  return False
421
431
 
422
432
  logging.getLogger("HWR").info(
@@ -454,6 +464,8 @@ class LNLSPilatusDet(AbstractDetector):
454
464
  logging.getLogger("HWR").error(
455
465
  "Error while setting Pilatus angle increment. Value must be float."
456
466
  )
467
+
468
+ logging.getLogger("HWR").exception("")
457
469
  return False
458
470
 
459
471
  logging.getLogger("HWR").info(
@@ -239,7 +239,7 @@ class LimaEigerDetector(AbstractDetector):
239
239
  try:
240
240
  self.get_command_object("stop_acq")()
241
241
  except Exception:
242
- pass
242
+ logging.getLogger("HWR").exception("")
243
243
 
244
244
  time.sleep(1)
245
245
  self.get_command_object("reset")()
@@ -871,7 +871,7 @@ class Marvin(AbstractSampleChanger.SampleChanger):
871
871
  Container.Pin.get_sample_address(basket_no, sample_no)
872
872
  )
873
873
  except Exception:
874
- pass
874
+ logging.getLogger("HWR").exception("")
875
875
  self._set_selected_component(basket)
876
876
  self._set_selected_sample(sample)
877
877
 
@@ -1042,7 +1042,7 @@ class Marvin(AbstractSampleChanger.SampleChanger):
1042
1042
  self.emit("progressStep", self._progress)
1043
1043
  self._info_dict["progress"] = self._progress
1044
1044
  except Exception:
1045
- pass
1045
+ logging.getLogger("HWR").exception("")
1046
1046
  elif prop_name == "CPuck":
1047
1047
  if prop_value == "1":
1048
1048
  centre_puck = True
@@ -54,7 +54,7 @@ class MicrodiffActuator(AbstractActuator):
54
54
  tt = float(self.get_property("timeout"))
55
55
  self.timeout = tt
56
56
  except TypeError:
57
- pass
57
+ logging.getLogger("HWR").exception("")
58
58
 
59
59
  if self.get_property("use_hwstate"):
60
60
  self.hwstate_attr = self.add_channel(
@@ -1,3 +1,5 @@
1
+ import logging
2
+
1
3
  from mxcubecore.BaseHardwareObjects import HardwareObject
2
4
 
3
5
  """
@@ -92,7 +94,7 @@ class MicrodiffBeamstop(HardwareObject):
92
94
  try:
93
95
  pos = self.beamstop.states[pos]
94
96
  except Exception:
95
- pass
97
+ logging.getLogger("HWR").exception("")
96
98
 
97
99
  if not noEmit:
98
100
  if pos:
@@ -57,7 +57,7 @@ class MicrodiffInOut(HardwareObject):
57
57
  tt = float(self.get_property("timeout"))
58
58
  self.timeout = tt
59
59
  except Exception:
60
- pass
60
+ logging.getLogger("HWR").exception("")
61
61
 
62
62
  if self.get_property("use_hwstate"):
63
63
  self.hwstate_attr = self.add_channel(
@@ -142,7 +142,7 @@ class MiniDiff(HardwareObject):
142
142
  try:
143
143
  self.lightWago = hwr.get_hardware_object(wl_prop)
144
144
  except Exception:
145
- pass
145
+ logging.getLogger("HWR").exception("")
146
146
 
147
147
  if self.phiMotor is not None:
148
148
  self.connect(self.phiMotor, "stateChanged", self.phiMotorStateChanged)
@@ -67,6 +67,8 @@ class MotorWPositions(AbstractMotor, Device):
67
67
  self.motor = self.get_object_by_role(role)
68
68
  except KeyError:
69
69
  logging.getLogger("HWR").error("MotorWPositions: motor not defined")
70
+
71
+ logging.getLogger("HWR").exception("")
70
72
  return
71
73
  try:
72
74
  self.delta = self["deltas"].get_property(role)
@@ -242,7 +242,7 @@ class PlateManipulator(SampleChanger):
242
242
  self.num_drops,
243
243
  ) = cmd_get_config.get_value()
244
244
  except Exception:
245
- pass
245
+ logging.getLogger("HWR").exception("")
246
246
  else:
247
247
  self.num_cols = self.get_property("numCols")
248
248
  self.num_rows = self.get_property("numRows")
@@ -323,7 +323,7 @@ class PlateManipulator(SampleChanger):
323
323
  self.plate_location_changed(self.chan_plate_location.get_value())
324
324
  self._on_state_changed(state)
325
325
  except AttributeError:
326
- pass
326
+ logging.getLogger("HWR").exception("")
327
327
 
328
328
  def _on_state_changed(self, state):
329
329
  """
@@ -466,7 +466,7 @@ class GraphicsItemPoint(GraphicsItem):
466
466
  self.__centred_position.kappa_phi,
467
467
  )
468
468
  except Exception:
469
- pass
469
+ logging.getLogger("HWR").exception("")
470
470
  return full_name
471
471
 
472
472
  def get_centred_position(self):
@@ -602,7 +602,7 @@ class GraphicsItemLine(GraphicsItem):
602
602
  start_cpos.kappa_phi,
603
603
  )
604
604
  except Exception:
605
- pass
605
+ logging.getLogger("HWR").exception("")
606
606
  return full_name
607
607
 
608
608
  def paint(self, painter, option, widget):
@@ -294,7 +294,7 @@ class QtGraphicsManager(AbstractSampleView):
294
294
  self.image_scale = self.get_property("default_image_scale")
295
295
  self.set_image_scale(self.image_scale, self.image_scale is not None)
296
296
  except Exception:
297
- pass
297
+ logging.getLogger("HWR").exception("")
298
298
 
299
299
  """
300
300
  if self.get_property("store_graphics_config") == True:
@@ -335,7 +335,7 @@ class QtGraphicsManager(AbstractSampleView):
335
335
  eval(self.get_property("magnification_tool"))
336
336
  )
337
337
  except Exception:
338
- pass
338
+ logging.getLogger("HWR").exception("")
339
339
 
340
340
  # try:
341
341
  # self.set_view_scale(self.get_property("view_scale"))
@@ -797,7 +797,7 @@ class QtGraphicsManager(AbstractSampleView):
797
797
  date_time_str = datetime.now().strftime("%Y_%m_%d_%H_%M_%S")
798
798
  result_image.save("/opt/embl-hh/var/crystal_images/%s.png" % date_time_str)
799
799
  except Exception:
800
- pass
800
+ logging.getLogger("HWR").exception("")
801
801
 
802
802
  def diffractometer_centring_failed(self, method, centring_status):
803
803
  """CleanUp method after centring failed
@@ -168,7 +168,7 @@ class QueueManager(HardwareObject, QueueEntryContainer):
168
168
  qe.handle_exception(ex)
169
169
  self.stop()
170
170
  except gevent.GreenletExit:
171
- pass
171
+ logging.getLogger("HWR").exception("")
172
172
 
173
173
  if isinstance(ex, base_queue_entry.QueueAbortedException):
174
174
  logging.getLogger("user_level_log").warning(
@@ -276,9 +276,9 @@ class QueueManager(HardwareObject, QueueEntryContainer):
276
276
  qe.stop()
277
277
  qe.post_execute()
278
278
  except base_queue_entry.QueueAbortedException:
279
- pass
279
+ logging.getLogger("HWR").exception("")
280
280
  except Exception:
281
- pass
281
+ logging.getLogger("HWR").exception("")
282
282
 
283
283
  if self._root_task:
284
284
  self._root_task.kill(block=False)
@@ -88,7 +88,7 @@ class RedisClient(HardwareObject):
88
88
  try:
89
89
  self.connect(HWR.beamline.flux, "fluxChanged", self.flux_changed)
90
90
  except Exception:
91
- pass
91
+ logging.getLogger("HWR").exception("")
92
92
 
93
93
  self.proposal_id = HWR.beamline.session.get_proposal()
94
94
  self.beamline_name = HWR.beamline.session.beamline_name
@@ -162,7 +162,7 @@ class RedisClient(HardwareObject):
162
162
  )
163
163
  logging.getLogger("HWR").debug("RedisClient: Graphics loaded")
164
164
  except Exception:
165
- pass
165
+ logging.getLogger("HWR").exception("")
166
166
 
167
167
  def save_queue_history_item(self, item):
168
168
  """Saves queue history in redisDB"""
@@ -187,7 +187,7 @@ class RedisClient(HardwareObject):
187
187
  for item in items:
188
188
  result.append(eval(item))
189
189
  except Exception:
190
- pass
190
+ logging.getLogger("HWR").exception("")
191
191
  return result
192
192
 
193
193
  def clear_db(self):
@@ -1,3 +1,4 @@
1
+ import logging
1
2
  import xml.sax
2
3
  from xml.sax.handler import ContentHandler
3
4
 
@@ -374,7 +375,7 @@ class SC3(SampleChanger):
374
375
  Pin.get_sample_address(basket_no, sample_no)
375
376
  )
376
377
  except Exception:
377
- pass
378
+ logging.getLogger("HWR").exception("")
378
379
  self._set_selected_component(basket)
379
380
  self._set_selected_sample(sample)
380
381
 
@@ -85,7 +85,7 @@ class PX1BeamInfo(HardwareObject):
85
85
  self.beam_info_dict["size_x"] = self.beam_size[0] = float(beamx)
86
86
  self.beam_info_dict["size_y"] = self.beam_size[1] = float(beamy)
87
87
  except Exception:
88
- pass
88
+ logging.getLogger("HWR").exception("")
89
89
 
90
90
  def connect_notify(self, signal):
91
91
  if signal == "beamInfoChanged":
@@ -104,7 +104,7 @@ class PX1Cryotong(Cats90):
104
104
  self._cmdAckSampleMemory()
105
105
  except Exception:
106
106
  """ do nothing if cmd not to acknowledge not in xml """
107
- pass
107
+ logging.getLogger("HWR").exception("")
108
108
  self.incoherent_state = value
109
109
 
110
110
  def _dry_and_soak_needed(self, value=None):
@@ -111,7 +111,7 @@ class PX1Pilatus(AbstractDetector, HardwareObject):
111
111
  beam_x = value[0]
112
112
  beam_y = value[1]
113
113
  except Exception:
114
- pass
114
+ logging.getLogger("HWR").exception("")
115
115
  return beam_x, beam_y
116
116
 
117
117
  def get_manufacturer(self):
@@ -89,7 +89,7 @@ class PX2Collect(AbstractCollect, HardwareObject):
89
89
  for undulator in self["undulators"]:
90
90
  undulators.append(undulator)
91
91
  except Exception:
92
- pass
92
+ logging.getLogger("HWR").exception("")
93
93
 
94
94
  beam_div_hor, beam_div_ver = HWR.beamline.beam.get_beam_divergence()
95
95
 
@@ -45,7 +45,7 @@ class SOLEILISPyBClient(ISPyBClient):
45
45
  hdlr.setFormatter(formatter)
46
46
  logger.addHandler(hdlr)
47
47
  except Exception:
48
- pass
48
+ logging.getLogger("HWR").exception("")
49
49
 
50
50
  logger.setLevel(logging.INFO)
51
51
 
@@ -111,19 +111,19 @@ class SOLEILISPyBClient(ISPyBClient):
111
111
  try:
112
112
  self._translations[code]["ldap"] = proposal.ldap
113
113
  except AttributeError:
114
- pass
114
+ logging.getLogger("HWR").exception("")
115
115
  try:
116
116
  self._translations[code]["ispyb"] = proposal.ispyb
117
117
  except AttributeError:
118
- pass
118
+ logging.getLogger("HWR").exception("")
119
119
  try:
120
120
  self._translations[code]["gui"] = proposal.gui
121
121
  except AttributeError:
122
- pass
122
+ logging.getLogger("HWR").exception("")
123
123
  except IndexError:
124
- pass
124
+ logging.getLogger("HWR").exception("")
125
125
  except Exception:
126
- pass
126
+ logging.getLogger("HWR").exception("")
127
127
 
128
128
  def translate(self, code, what):
129
129
  """
@@ -187,7 +187,7 @@ class SOLEILISPyBClient(ISPyBClient):
187
187
  logging.debug("SOLEIL ISPyBClient - %s is %s " % (prop, ispyb_path))
188
188
  mx_collect_dict[prop] = ispyb_path
189
189
  except Exception:
190
- pass
190
+ logging.getLogger("HWR").exception("")
191
191
 
192
192
  def prepare_image_for_lims(self, image_dict):
193
193
  for prop in ["jpegThumbnailFileFullPath", "jpegFileFullPath"]:
@@ -196,7 +196,7 @@ class SOLEILISPyBClient(ISPyBClient):
196
196
  ispyb_path = HWR.beamline.session.path_to_ispyb(path)
197
197
  image_dict[prop] = ispyb_path
198
198
  except Exception:
199
- pass
199
+ logging.getLogger("HWR").exception("")
200
200
 
201
201
 
202
202
  def test_hwo(hwo):
@@ -27,7 +27,7 @@ class SOLEILRuche(HardwareObject):
27
27
  if HWR.beamline.session.user_id is None:
28
28
  return
29
29
  except Exception:
30
- pass
30
+ logging.getLogger("HWR").exception("")
31
31
  if os.path.isdir(path):
32
32
  path_to_sync = path
33
33
  elif os.path.exists(path):
@@ -60,7 +60,7 @@ class TangoDCMotor(HardwareObject):
60
60
  try:
61
61
  self.threshold = float(threshold)
62
62
  except Exception:
63
- pass
63
+ logging.getLogger("HWR").exception("")
64
64
 
65
65
  self.set_is_ready(True)
66
66
  try:
@@ -5,6 +5,7 @@ Contains information regarding the current session and methods to
5
5
  access and manipulate this information.
6
6
  """
7
7
 
8
+ import logging
8
9
  import os
9
10
  import socket
10
11
  import time
@@ -93,7 +94,7 @@ class Session(HardwareObject):
93
94
  domain = socket.getfqdn().split(".")
94
95
  self.email_extension = ".".join((domain[-2], domain[-1]))
95
96
  except (TypeError, IndexError):
96
- pass
97
+ logging.getLogger("HWR").exception("")
97
98
 
98
99
  self.set_base_data_directories(
99
100
  file_info["base_directory"],
@@ -155,7 +155,7 @@ class SpecShell(HardwareObject):
155
155
  try:
156
156
  buf_list = buf.split()
157
157
  except Exception:
158
- pass
158
+ logging.getLogger("HWR").exception("")
159
159
  else:
160
160
  i = 0
161
161
  while i < len(buf_list):
@@ -163,20 +163,20 @@ class SpecShell(HardwareObject):
163
163
  try:
164
164
  cmd_aux = buf_list[i + 1]
165
165
  except Exception:
166
- pass
166
+ logging.getLogger("HWR").exception("")
167
167
  else:
168
168
  try:
169
169
  left_par = cmd_aux[0]
170
170
  right_par = cmd_aux[-1]
171
171
  midle_num = cmd_aux[1:-1]
172
172
  except Exception:
173
- pass
173
+ logging.getLogger("HWR").exception("")
174
174
  else:
175
175
  if left_par == "(" and right_par == ")":
176
176
  try:
177
177
  int(midle_num)
178
178
  except Exception:
179
- pass
179
+ logging.getLogger("HWR").exception("")
180
180
  else:
181
181
  commands_list.append(cmd_name.lstrip("*"))
182
182
  i += 2
@@ -222,7 +222,7 @@ class SpecShell(HardwareObject):
222
222
  try:
223
223
  self.specShellCommand.abort()
224
224
  except SpecClient.SpecClientError.SpecClientError as diag:
225
- pass
225
+ logging.getLogger("HWR").exception("")
226
226
 
227
227
  def outputReceived(self, output):
228
228
  if self.lsdefRunning:
@@ -250,7 +250,7 @@ class SpecShell(HardwareObject):
250
250
  else:
251
251
  cmds.append(cmd.method)
252
252
  except Exception:
253
- pass
253
+ logging.getLogger("HWR").exception("")
254
254
  return cmds
255
255
 
256
256
  def getAllCommands(self):
@@ -63,7 +63,7 @@ class SpecState(Procedure):
63
63
  try:
64
64
  cmd = self.get_command_object("SpecStateMacro")
65
65
  except KeyError:
66
- pass
66
+ logging.getLogger("HWR").exception("")
67
67
  else:
68
68
  if cmd is not None:
69
69
  cmd.disconnect_signal("commandReady", self.commandReady)
@@ -117,7 +117,7 @@ class TangoLimaMpegVideo(TangoLimaVideo):
117
117
  for p in ps:
118
118
  p.kill()
119
119
  except psutil.NoSuchProcess:
120
- pass
120
+ logging.getLogger("HWR").exception("")
121
121
 
122
122
  self._video_stream_process = None
123
123
 
@@ -20,6 +20,8 @@
20
20
  TangoMotor class defines motor in the Tango control system (used and tested in DESY/P11
21
21
  """
22
22
 
23
+ import logging
24
+
23
25
  import gevent
24
26
 
25
27
  from mxcubecore.HardwareObjects.abstract.AbstractMotor import AbstractMotor
@@ -106,7 +108,7 @@ class TangoMotor(AbstractMotor):
106
108
  if self.get_property("default_limits"):
107
109
  self.update_limits(eval(self.get_property("default_limits")))
108
110
  except Exception:
109
- pass
111
+ logging.getLogger("HWR").exception("")
110
112
 
111
113
  self.cmd_stop = self.get_command_object("stopAxis")
112
114
  if self.cmd_stop is None:
@@ -185,7 +185,7 @@ class UserTypeISPyBLims(ISPyBAbstractLIMS):
185
185
  session.endDate, "%Y-%m-%d %H:%M:%S"
186
186
  )
187
187
  except Exception:
188
- pass
188
+ logging.getLogger("HWR").exception("")
189
189
  sessions.append(utf_encode(asdict(session)))
190
190
 
191
191
  except WebFault as e:
@@ -281,7 +281,7 @@ class UserTypeISPyBLims(ISPyBAbstractLIMS):
281
281
  session.endDate, "%Y-%m-%d %H:%M:%S"
282
282
  )
283
283
  except Exception:
284
- pass
284
+ logging.getLogger("HWR").exception("")
285
285
 
286
286
  sessions.append(utf_encode(asdict(session)))
287
287
 
@@ -291,6 +291,8 @@ class UserTypeISPyBLims(ISPyBAbstractLIMS):
291
291
 
292
292
  except URLError:
293
293
  logging.getLogger("ispyb_client").warning(_CONNECTION_ERROR_MSG)
294
+
295
+ logging.getLogger("HWR").exception("")
294
296
  return empty_dict
295
297
 
296
298
  logging.getLogger("ispyb_client").info(str(sessions))
@@ -88,7 +88,7 @@ class XMLRPCServer(HardwareObject):
88
88
  self._server.server_close()
89
89
  del self._server
90
90
  except AttributeError:
91
- pass
91
+ logging.getLogger("HWR").exception("")
92
92
 
93
93
  def open(self):
94
94
  # The value of the member self.port is set in the xml configuration
@@ -691,7 +691,7 @@ class XMLRPCServer(HardwareObject):
691
691
  module_name + "." + sub_module[1], recurse=False, prefix=prefix
692
692
  )
693
693
  except StopIteration:
694
- pass
694
+ logging.getLogger("HWR").exception("")
695
695
 
696
696
  def set_token(self, token):
697
697
  SecureXMLRpcRequestHandler.setReferenceToken(token)
@@ -106,7 +106,7 @@ class AbstractCollect(HardwareObject, object):
106
106
  for undulator in self.config.undulators:
107
107
  undulators.append(undulator)
108
108
  except Exception:
109
- pass
109
+ logging.getLogger("HWR").exception("")
110
110
 
111
111
  beam_div_hor, beam_div_ver = HWR.beamline.beam.get_beam_divergence()
112
112