
Dep:
PyQT - QT/KDE-Bindings
PIL - Python Image Library
lots of TrueTypeFonts
Source (link to git-repo or to original if based on someone elses unmodified work):
0.1a
====
first release
0.1a2
=====
*start font setup fixed
*some bugfixes of cacheparsing
Ratings & Comments
18 Comments
Hey Strunzel, I like this app but it isnt useable due to the font error. Im using Kubuntu intrepid Ibex with all the dependencies resolved but still the default font cant be found. Also when I pick another it will still gives me the same error.
When I try to start it it says: --------------------- ./ButtonMaker Traceback (most recent call last): File "./main.py", line 15, in ? main(sys.argv) File "./main.py", line 9, in main win=my_func.Go() File "/mnt/data1/downloads/programs/25613-buttonmaker-0.1a2/buttonmaker-0.1a2/my_func.py", line 85, in __init__ self.fontTest('none') File "/mnt/data1/downloads/programs/25613-buttonmaker-0.1a2/buttonmaker-0.1a2/my_func.py", line 242, in fontTest dirs = FontDir(self.FontConf) File "/mnt/data1/downloads/programs/25613-buttonmaker-0.1a2/buttonmaker-0.1a2/fontConfig.py", line 62, in FontDir if file_[1].find('conf') == 0: IndexError: list index out of range --------------------- I am using Debian Sid and I have python-imaging and python-qt3 installed.
Note: I don't know why the post is formatted like this. The preview was correct...
When i start it in the konsole, I get the following message: ------------------------------------- ./ButtonMaker Traceback (most recent call last): File "./main.py", line 4, in ? from qt import * ImportError: No module named qt ------------------------------------- Is there a dep. missing?
Yes. You have to get the qt-bindings for python, PyQT. There is no way around within this script, believe me. :)
hm, ok, I installed some packages. now this seems to work. But now I get the following error: Traceback (most recent call last): File "/opt/buttonmaker/main.py", line 5, in ? import my_func File "/opt/buttonmaker/my_func.py", line 39, in ? from my_image import My_Image File "/opt/buttonmaker/my_image.py", line 2, in ? import Image, ImageDraw, ImageFont ImportError: No module named Image
PIL (Python Image Library) is also needed.
Thank you (Sorry, but I didn't read the list of deps. at top of this site) But now I have the same problem like the others above. Is there already a solution? (modify the /etc/fonts/fonts.conf is not a good idea!) I've running a debian (Kanotix)
In debian you must install python-qt3
Hello, When i launch buttonmaker-0.1a2 on my Debian Sid, it prints this message and die. $ ./ButtonMaker Traceback (most recent call last): File "./main.py", line 15, in ? main(sys.argv) File "./main.py", line 9, in main win=my_func.Go() File "/home/goneri/divers/buttonmaker-0.1a2/my_func.py", line 85, in __init__ self.fontTest('none') File "/home/goneri/divers/buttonmaker-0.1a2/my_func.py", line 242, in fontTest dirs = FontDir(self.FontConf) File "/home/goneri/divers/buttonmaker-0.1a2/fontConfig.py", line 63, in FontDir pathlist = _fontDir(dir_+'/'+filelist[i]) File "/home/goneri/divers/buttonmaker-0.1a2/fontConfig.py", line 54, in _fontDir parser.parse(file) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed self._parser.Parse(data, isFinal) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 395, in external_entity_ref self._source.getSystemId() or File "/usr/lib/python2.3/site-packages/_xmlplus/sax/saxutils.py", line 523, in prepare_input_source f = urllib2.urlopen(source.getSystemId()) File "/usr/lib/python2.3/urllib2.py", line 129, in urlopen return _opener.open(url, data) File "/usr/lib/python2.3/urllib2.py", line 324, in open type_ = req.get_type() File "/usr/lib/python2.3/urllib2.py", line 226, in get_type raise ValueError, "unknown url type: %s" % self.__original ValueError: unknown url type: /etc/fonts/fonts.dtd Regards, Gonéri
if i remove the line : from /etc/fonts/fonts.conf ButtonMaker start fine. The probleme seem to be that xmlplus can't open my /etc/fonts/fonts.dtd.
The line is : <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
Plz check your system for all fontconfig-package related stuff. It should contain this file. Maybe it is missing in the debian package as another poster got the same problem, see above. Removing the doctype-tag may cause trouble with your font setup, it's your risk.
I get this error, running BM: python main.py I/O error(2): No such file or directory Traceback (most recent call last): File "main.py", line 15, in ? main(sys.argv) File "main.py", line 9, in main win=my_func.Go() File "/home/giancarlo/Download/buttonmaker-0.1a/my_func.py", line 87, in __init__ self.update_all() File "/home/giancarlo/Download/buttonmaker-0.1a/my_func.py", line 143, in update_all klaus = self.my_img.draw() File "/home/giancarlo/Download/buttonmaker-0.1a/my_image.py", line 131, in draw image = self._drawBox(image,self.BoxLeft) File "/home/giancarlo/Download/buttonmaker-0.1a/my_image.py", line 100, in _drawBox TextFont = ImageFont.truetype(box.TextFont, box.TextSize) File "/usr/lib/python2.4/site-packages/PIL/ImageFont.py", line 202, in truetype return FreeTypeFont(filename, size, index, encoding) File "/usr/lib/python2.4/site-packages/PIL/ImageFont.py", line 121, in __init__ self.font = _imagingft.getfont(file, size, index, encoding) IOError: cannot open resource Thx!
I forgot to add the message BM sends: "The standard font file could not be found. Please choose another one." Then the font choosing dialog appears and no matter which font I select, the message is shown again. Instead of clicking OK in the font chooser, I click Cancel: BM exits with the error I wrote in the last message.
I obtain this error: felipe@debian:~/buttonmaker-0.1a$ ./ButtonMaker Traceback (most recent call last): File "./main.py", line 15, in ? main(sys.argv) File "./main.py", line 9, in main win=my_func.Go() File "/home/felipe/buttonmaker-0.1a/my_func.py", line 84, in __init__ self.fontTest('none') File "/home/felipe/buttonmaker-0.1a/my_func.py", line 222, in fontTest dirs = FontDir(self.FontConf) File "/home/felipe/buttonmaker-0.1a/fontConfig.py", line 63, in FontDir pathlist = _fontDir(dir_+'/'+filelist[i]) File "/home/felipe/buttonmaker-0.1a/fontConfig.py", line 54, in _fontDir parser.parse(file) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed self._parser.Parse(data, isFinal) File "/usr/lib/python2.3/site-packages/_xmlplus/sax/expatreader.py", line 395, in external_entity_ref self._source.getSystemId() or File "/usr/lib/python2.3/site-packages/_xmlplus/sax/saxutils.py", line 523, in prepare_input_source f = urllib2.urlopen(source.getSystemId()) File "/usr/lib/python2.3/urllib2.py", line 129, in urlopen return _opener.open(url, data) File "/usr/lib/python2.3/urllib2.py", line 324, in open type_ = req.get_type() File "/usr/lib/python2.3/urllib2.py", line 226, in get_type raise ValueError, "unknown url type: %s" % self.__original ValueError: unknown url type: /etc/fonts/fonts.dtd PS.it's a fantastic idea,great job!
Ok, I expected such errors due to my font implementation. At the moment the app only supports TT-fonts with "Times New Roman" as default. If the app couldnt find it at the beginning the fontDialog requests to choose another one. At this point I forgot to handle your cancel action, sorry for this, I will fix it(@SWaN). @SWaN: Please make sure you have some TT-fonts installed (or FreeType), all non-TT-fonts from the dialog wont do it. @ATAHUALPA: I couldnt find another way to catch the real path of the fontfile then by parsing your font installation. So the app looks into "etc/fonts"(where fonts-paths normally should be set up), catches all dirs from the conf-files and processes the font-cache of the found font dirs. This awkward way is expected to produce errors and if your font installation doesnt fit the above at any point, it will fail. Regarding your problem: the error says: "unknown url type: /etc/fonts/fonts.dtd" which means that you havent the "fonts.dtd" file in etc/fonts, so the conf-files couldnt be parsed because of the lack of the definition file. Just get this file and place it there. I dont know your dist., for SuSE you can find it in the fontconfig-package. I am displeased about the font situation as well. If there is some interest in this program I plan to get rid of the PIL-Package, wich causes all these problems, maybe the whole thing becomes pure Qt-c++ code with a new design.
All of these font files are TTF. Times New Roman has also been tried, with no success...