Open LukasDrude opened 9 years ago
Possibly a try except around the call to getFonts l Unfortunately I can't test this on OSX as I don't have access to a mac at the moment.
Sorry accidentally closed the issue. I can try and change the default font for mac as a fix. Will do that when I get the chance.
A quick workaround is to fix indeed the font to a fixed font like this in the file //anaconda/envs/py3k/lib/python3.3/site-packages/pandastable/plotting.py
:
def getFonts():
"""Get the current list of system fonts"""
import matplotlib.font_manager
l = matplotlib.font_manager.get_fontconfig_fonts()
fname = '/Library/Fonts/OsakaMono.ttf'
fonts = [matplotlib.font_manager.FontProperties(fname=fname).get_name()]
fonts = list(set(fonts))
fonts.sort()
#f = matplotlib.font_manager.FontProperties(family='monospace')
#print (matplotlib.font_manager.findfont(f))
return fonts
The problem is most likely, that some of the fonts do not behave as the should.
Thanks. I will incorporate this kind of fix when I return from hols. So does the software run ok on osx with this fix?
Although, I managed to get it started, I would still not consider it "running".
import os
os.system('''/usr/bin/osascript -e 'tell app "Finder" to set frontmost of process "python3.3" to true' ''')
root.mainloop()
Another strange thing is best summarized in a screenshot. The cell, which is edited, is hardly visible:
I don't ask you to fix all these things, I just wanted to give something back for your effort to create this software. I can create different issues from this, if you want.
Those two things you could certainly add issues for if u have time. The problem is I have no way to use OSX and so it has never been tested on mac. But at some point I will do that. I think python 3.4 might be a better bet as this is what I've been using on the other platforms. There must be a solution for the background launching problem.
Hey just want to say I ran into both issues, but for the font one, just omitting "/System/Library/Fonts/Apple Color Emoji.ttf" from the list of fonts seems to fix the issue of it crashing. Maybe that might be the solution, albeit a non-fluid one. If I'm correct the problem seems to stem with the Freetype library itself.
For the Entry text issue, it looks like the padding being set by self.style.configure("TEntry", padding(3, 3, 3, 3)) is causing that. Removing it fixes it for mac, but I don't know how it affects Linux/Windows.
For the window displaying to the front, adding self.main.lift() to DataExplore init seems to fix that.
Thanks for testing. The entry style is not much use in linux or windows anyway so I can remove it. self.main.lift() also seems to work ok for linux and windows. I'm not sure about the font problem. How did you omit the font? It might be specific to the version of matplotlib too. I don't have OSX so can't test it. Are you using homebrew or anaconda? Seems to be related to this bug: https://github.com/matplotlib/matplotlib/issues/3903/
Sorry for the late reply, not ignoring this. Anaconda, Python 3.4. I just simply checked for "Apple Color Emoji.ttf" in the font text in a for loop and omitted all of the text that contained it, I didn't really think it was worth that much time into looking how to properly fix it . That also looks to be what I've seen for issues regarding this.
I am on:
When I execute
dataexplore
, I get the following error message:What can be a possible issue? I already deleted my
.matplotlib
folder as suggested on stackoverflow.com.