GithubHelp home page GithubHelp logo

Comments (2)

victordomingos avatar victordomingos commented on May 28, 2024

Seems to be an issue similar to #13. There were some commits on this repository since the latest PyPI update. It may have been solved recently. The expected behaviour is to skip the problematic files and keep going with the next, silently. No logging implemented for now, though.

Are you able to test it with the current GitHub version?

from optimize-images.

varnav avatar varnav commented on May 28, 2024

Current version sometimes fails for me:

concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\concurrent\futures\process.py", line 243, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "C:\Program Files\Python39\lib\concurrent\futures\process.py", line 202, in _process_chunk
    return [fn(*args) for args in chunk]
  File "C:\Program Files\Python39\lib\concurrent\futures\process.py", line 202, in <listcomp>
    return [fn(*args) for args in chunk]
  File "C:\src\optimize-images\optimize_images\do_optimization.py", line 44, in do_optimization
    return optimize_jpg(t)
  File "C:\src\optimize-images\optimize_images\img_optimize_jpg.py", line 119, in optimize_jpg
    has_exif)
UnboundLocalError: local variable 'has_exif' referenced before assignment
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\src\optimize-images\optimize_images\__main__.py", line 139, in <module>
    main()
  File "C:\src\optimize-images\optimize_images\__main__.py", line 96, in main
    for r in executor.map(do_optimization, tasks):
  File "C:\Program Files\Python39\lib\concurrent\futures\process.py", line 559, in _chain_from_iterable_of_lists
    for element in iterable:
  File "C:\Program Files\Python39\lib\concurrent\futures\_base.py", line 600, in result_iterator
    yield fs.pop().result()
  File "C:\Program Files\Python39\lib\concurrent\futures\_base.py", line 433, in result
    return self.__get_result()
  File "C:\Program Files\Python39\lib\concurrent\futures\_base.py", line 389, in __get_result
    raise self._exception
UnboundLocalError: local variable 'has_exif' referenced before assignment

Process finished with exit code 1

from optimize-images.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.