fraser-hemp / gradify

CSS gradient placeholders
http://www.gradifycss.com
1.44k stars 76 forks source link

Unable to run #2

Open monicaphalswal opened 9 years ago

monicaphalswal commented 9 years ago

After doing this:

python gradify.py --demo --spread --single

I get this with a blank browser window: [19551:19551:0614/122502:ERROR:browser_main_loop.cc(201)] GTK theme error: Unable to locate theme engine in module_path: "adwaita", [19551:19551:0614/122502:ERROR:browser_main_loop.cc(201)] GTK theme error: Unable to locate theme engine in module_path: "adwaita", /usr/share/themes/Orchis/gtk-2.0/Apps/xfce.rc:150: error: invalid string constant "combo", expected valid string constant Created new window in existing browser session.

fraser-hemp commented 9 years ago

OS/Browser?

monicaphalswal commented 9 years ago

Ubuntu 14.04 LTS/Chrome

fraser-hemp commented 9 years ago

Interesting. Is the "demo.html" file in the directory that gradify.py is in, and if so, can you open it manually?

monicaphalswal commented 9 years ago

Yes they are in same directory and I am able to open them.

borrisandreas commented 9 years ago

Hi Fraser Hemphill. Your demo is brillant. But unfortunately the script doesn't work on my machine (os x 10.10.3, python 2.7.6, pillow freshly installed). The demo.html is generated, but it is absolutely ermpty. On the other hand, the script doesn't report any error. Any idea? Thank you and best regards B.

fraser-hemp commented 9 years ago

Hi B, what does the program output when the --demo flag is not added?

christianlerke commented 9 years ago

Same issue as @borrisandreas on OS X as well as on Ubuntu Server. Running the command generates an empty demo.html even though the directory contains several images. No errors or warnings.

fraser-hemp commented 9 years ago

and with no --demo flag?

christianlerke commented 9 years ago

I think i found the issue. If i run it against a certain file using -f in the command I get this error:

Traceback (most recent call last):
  File "gradify.py", line 315, in <module>
    foo = Gradify()
  File "gradify.py", line 57, in __init__
    self.get_file(self.args.file)
  File "gradify.py", line 197, in get_file
    self.get_directions(filen)
  File "gradify.py", line 85, in get_directions
    foo = foo.resize((100, 100), Image.ANTIALIAS)
  File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 1547, in resize
    self.load()
  File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py", line 203, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 419, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available

And here the error when attempting a png:

Traceback (most recent call last):
  File "gradify.py", line 315, in <module>
    foo = Gradify()
  File "gradify.py", line 57, in __init__
    self.get_file(self.args.file)
  File "gradify.py", line 197, in get_file
    self.get_directions(filen)
  File "gradify.py", line 88, in get_directions
    col = self.get_colors()
  File "gradify.py", line 248, in get_colors
    h = self.image.filter(ImageFilter.BLUR)
  File "/usr/local/lib/python2.7/site-packages/PIL/Image.py", line 1070, in filter
    return self._new(filter.filter(self.im))
  File "/usr/local/lib/python2.7/site-packages/PIL/ImageFilter.py", line 53, in filter
    raise ValueError("cannot filter palette images")
ValueError: cannot filter palette images
fraser-hemp commented 9 years ago

Oh yeah, I should have picked up on that. Currently only takes jpg type files, I'll add that to the readme

christianlerke commented 9 years ago

My bad -f for .jpg works on OS X but on Ubuntu it throws this error.

Traceback (most recent call last):
  File "gradify.py", line 315, in <module>
    foo = Gradify()
  File "gradify.py", line 57, in __init__
    self.get_file(self.args.file)
  File "gradify.py", line 197, in get_file
    self.get_directions(filen)
  File "gradify.py", line 85, in get_directions
    foo = foo.resize((100, 100), Image.ANTIALIAS)
  File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 1547, in resize
    self.load()
  File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py", line 203, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 419, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available

Probably just a missing library though.

fraser-hemp commented 9 years ago

Quick google suggests Ubuntu might need the jpeg encoder? http://askubuntu.com/questions/211627/how-to-add-support-for-the-jpeg-image-format

christianlerke commented 9 years ago

Thanks, its a great tool.

borrisandreas commented 9 years ago

Hi Fraser

without —demo nothing happens. The script runs without error but also without any result.

Best regards B.

Am 16.06.2015 um 13:50 schrieb fraser-hemp notifications@github.com:

Hi B, what does the program output when the --demo flag is not added?

— Reply to this email directly or view it on GitHub.

fraser-hemp commented 9 years ago

what are the file types of the images?

borrisandreas commented 9 years ago

Hi Fraser, the files are all jpg Best regards B.

Am 16.06.2015 um 14:30 schrieb fraser-hemp notifications@github.com:

what are the file types of the images?

— Reply to this email directly or view it on GitHub.

purpleferret commented 8 years ago

Hi, I had the same issue with the empty demo.html or if no demo option is given, I got no output. I could get it working with adding the option -d . while the "." represents the current directory. python ~/git/gradify/gradify.py --demo --spread -d .

Great tool!