Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run #2

Open
monicaphalswal opened this issue Jun 14, 2015 · 17 comments
Open

Unable to run #2

monicaphalswal opened this issue Jun 14, 2015 · 17 comments
Assignees

Comments

@monicaphalswal
Copy link

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
Copy link
Owner

OS/Browser?

@fraser-hemp fraser-hemp self-assigned this Jun 14, 2015
@monicaphalswal
Copy link
Author

Ubuntu 14.04 LTS/Chrome

@fraser-hemp
Copy link
Owner

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

@monicaphalswal
Copy link
Author

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

@borrisandreas
Copy link

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
Copy link
Owner

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

@christianlerke
Copy link

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
Copy link
Owner

and with no --demo flag?

@christianlerke
Copy link

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
Copy link
Owner

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

@christianlerke
Copy link

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
Copy link
Owner

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

@christianlerke
Copy link

Thanks, its a great tool.

@borrisandreas
Copy link

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 [email protected]:

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
Copy link
Owner

what are the file types of the images?

@borrisandreas
Copy link

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

Am 16.06.2015 um 14:30 schrieb fraser-hemp [email protected]:

what are the file types of the images?


Reply to this email directly or view it on GitHub.

@purpleferret
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants