Skip to content

Commit

Permalink
Merge pull request #1038 from vasole/batch
Browse files Browse the repository at this point in the history
[PyMcaBatch] Error generating report
  • Loading branch information
vasole authored Oct 9, 2023
2 parents 06ba806 + 513387b commit 54b6698
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions PyMca5/PyMcaGui/physics/xrf/QtMcaAdvancedFitReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,9 @@ def getResult(self):
for peak0 in iterator:
name = peak0+"esc"
peak = peak0+"esc"
if name not in result[group]:
# i.e. peak0 = "Al K" and Si detector
continue
if result[group][name]['ratio'] > 0.0:
text += '<tr><td></td>'
energy = ("%.3f" % (result[group][peak]['energy']))
Expand Down
5 changes: 5 additions & 0 deletions PyMca5/PyMcaGui/pymca/PyMcaBatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import signal
import atexit
import logging
import traceback
from glob import glob
from contextlib import contextmanager
try:
Expand Down Expand Up @@ -1822,6 +1823,10 @@ def onMca(self, ddict):
except Exception:
_logger.warning("ERROR on REPORT %s", sys.exc_info())
_logger.warning("%s", sys.exc_info()[1])
try:
_logger.warning("%s", ''.join(traceback.format_tb(sys.exc_info()[2])))
except Exception:
pass
_logger.warning("filename = %s key =%s " , filename, key)
_logger.warning("If your batch is stopped, please report this")
_logger.warning("error sending the above mentioned file and the")
Expand Down

0 comments on commit 54b6698

Please sign in to comment.