Skip to content

classify command downloads to a .png and then fails to convert the image #17

@hakanai

Description

@hakanai

For any URL I have tried so far, I get the following outcome:

$ classify 'http://www.kitchengoodies.ca/uploads/ecom/fullsize/Lecreuset%20Stainless%20Kettle.jpg'
Traceback (most recent call last):
  File "/usr/local/bin/classify", line 11, in <module>
    load_entry_point('tensorpy==1.0.17', 'console_scripts', 'classify')()
  File "build/bdist.macosx-10.12-x86_64/egg/tensorpy/classify.py", line 91, in main
  File "build/bdist.macosx-10.12-x86_64/egg/tensorpy/image_base.py", line 90, in classify_image_url
  File "build/bdist.macosx-10.12-x86_64/egg/tensorpy/image_base.py", line 31, in convert_image_file_to_jpg
Exception: Cannot convert downloads_folder/temp_image_c614d6edb49b4cbe995bbf71bca1c780.png to jpg!

The comedy gold here is that the image was already a JPG, but somehow classify has saved it in a file ending in '.png', and is now wondering why it fails to convert this to JPEG. 🤣

(The classify_image.py script which operates on local files works totally fine, of course.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions