Actions
Bug #3495
openCTF matplotlib font path Error
Start date:
08/31/2015
Due date:
% Done:
0%
Estimated time:
Affected Version:
Appion/Leginon 3.2
Show in known bugs:
No
Workaround:
Description
CTFFind3 crashes before finishing a micrograph - the log file is attached. This was run at the Salk server, and we have updated to the latest version of myami. Thank you.
Files
Updated by Neil Voss about 9 years ago
- Related to Bug #3438: noise subtraction in ctfdisplay normalization error added
Updated by Neil Voss about 9 years ago
- Assignee changed from Neil Voss to Dmitry Lyumkis
This look like it has something to do with your matplotlib install, it could not find a font to create a graph.
Updated by Neil Voss about 8 years ago
perhaps relevant code in apCtf/ctfdisplay.py:
######### ## setup font to add text ######### fontpath = "/usr/share/fonts/liberation/LiberationSans-Regular.ttf" from PIL import ImageFont if os.path.isfile(fontpath): fontsize = int(math.ceil( 48/2. * min(powerspec.shape)/float(maxsize))*2) font = ImageFont.truetype(fontpath, fontsize) else: font = ImageFont.load_default()
Updated by Neil Voss about 8 years ago
- Subject changed from CTFFind3 Error to CTF matplotlib font path Error
Updated by Neil Voss about 8 years ago
Easier to read Traceback
Traceback (most recent call last): File "/data2/log-l/progs/myami/appion/bin/ctfestimate.py", line 449, in <module> imgLoop.run() File "/data2/log-l/progs/myami/appion/appionlib/appionLoop2.py", line 93, in run self.loopCommitToDatabase(imgdata) File "/data2/log-l/progs/myami/appion/appionlib/appionLoop2.py", line 143, in loopCommitToDatabase return self.commitToDatabase(imgdata) File "/data2/log-l/progs/myami/appion/bin/ctfestimate.py", line 349, in commitToDatabase ctfinsert.validateAndInsertCTFData(imgdata, self.ctfvalues, self.ctfrun, self.params['rundir']) File "/data2/log-l/progs/myami/appion/appionlib/apCtf/ctfinsert.py", line 45, in validateAndInsertCTFData ctfvalues = runCTFdisplayTools(imgdata, ctfvalues, opimagedir, fftpath, fftfreq) File "/data2/log-l/progs/myami/appion/appionlib/apCtf/ctfinsert.py", line 83, in runCTFdisplayTools ctfdisplaydict = ctfdisplay.makeCtfImages(imgdata, ctfvalues, fftpath, fftfreq) File "/data2/log-l/progs/myami/appion/appionlib/apCtf/ctfdisplay.py", line 1266, in makeCtfImages ctfdisplaydict = a.CTFpowerspec(imgdata, ctfdata, fftpath, fftfreq, twod=twod) File "/data2/log-l/progs/myami/appion/appionlib/apCtf/ctfdisplay.py", line 1148, in CTFpowerspec normpowerspec = self.normalizeCtf(powerspec, twod=twod) File "/data2/log-l/progs/myami/appion/appionlib/apCtf/ctfdisplay.py", line 622, in normalizeCtf pyplot.savefig(self.plotsfile, format="png", dpi=300, orientation='landscape', pad_inches=0.0) File "/usr/lib64/python2.6/site-packages/matplotlib/pyplot.py", line 356, in savefig return fig.savefig(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/matplotlib/figure.py", line 1032, in savefig self.canvas.print_figure(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/matplotlib/backend_bases.py", line 1476, in print_figure **kwargs) File "/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_agg.py", line 358, in print_png FigureCanvasAgg.draw(self) File "/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_agg.py", line 314, in draw self.figure.draw(self.renderer) File "/usr/lib64/python2.6/site-packages/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "/usr/lib64/python2.6/site-packages/matplotlib/figure.py", line 773, in draw for a in self.axes: a.draw(renderer) File "/usr/lib64/python2.6/site-packages/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "/usr/lib64/python2.6/site-packages/matplotlib/axes.py", line 1735, in draw a.draw(renderer) File "/usr/lib64/python2.6/site-packages/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "/usr/lib64/python2.6/site-packages/matplotlib/axis.py", line 742, in draw tick.draw(renderer) File "/usr/lib64/python2.6/site-packages/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "/usr/lib64/python2.6/site-packages/matplotlib/axis.py", line 196, in draw self.label1.draw(renderer) File "/usr/lib64/python2.6/site-packages/matplotlib/text.py", line 515, in draw bbox, info = self._get_layout(renderer) File "/usr/lib64/python2.6/site-packages/matplotlib/text.py", line 279, in _get_layout clean_line, self._fontproperties, ismath=ismath) File "/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_agg.py", line 156, in get_text_width_height_descent self.mathtext_parser.parse(s, self.dpi, prop) File "/usr/lib64/python2.6/site-packages/matplotlib/mathtext.py", line 2797, in parse font_output = fontset_class(prop, backend) File "/usr/lib64/python2.6/site-packages/matplotlib/mathtext.py", line 658, in __init__ self._stix_fallback = StixFonts(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/matplotlib/mathtext.py", line 900, in __init__ fullpath = findfont(name) File "/usr/lib64/python2.6/site-packages/matplotlib/font_manager.py", line 1306, in findfont if not os.path.exists(font): File "/usr/lib64/python2.6/genericpath.py", line 18, in exists st = os.stat(path) TypeError: coercing to Unicode: need string or buffer, dict found
Actions