difference-engine / thumbnail-generator-ubuntu Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
We generate large collage image files for printing.
thumbgen consistently crashes on a directory containing a 24213x14173 pixel 200Mbyte image. All images are valid jpegs and can be opened and viewed using 'feh'
Setup: AMD 4750G / 32GB RAM / 512GB SSD / 50TB NAS / Fedora 37
Error message:
$ thumbgen -i -r -d /imgs/prn_420x240cm_color
Found 1 files in the directory: /filer/imgs/prn_420x240cm_color
Found 1 images
0%| | 0/1 [00:00<?, ?it/s]
2022-12-31 10:12:31.215 | ERROR | thumbgen.thumbgen:main:94 - An error has been caught in function 'main', process 'MainProcess' (4133634), thread 'MainThread' (140614882113344):
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib64/python3.11/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/thumbgen/thumbgen.py", line 39, in make_thumbnail
thumbnail = factory.generate_thumbnail(uri, mime_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-spawn-exit-error-quark: Child process exited with code 1 (1)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/thumbgen", line 8, in
sys.exit(main())
│ │ └
│ └
└ <module 'sys' (built-in)>
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function BaseCommand.main at 0x7fe365efd620>
└
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x7fe366296f90>
│ └ <function Command.invoke at 0x7fe365efcb80>
└
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {'only_images': True, 'recursive': True, 'img_dirs': '/imgs/prn_420x240cm_color', 'workers': 1}
│ │ │ │ └ <click.core.Context object at 0x7fe366296f90>
│ │ │ └ <function main at 0x7fe360b4f4c0>
│ │ └
│ └ <function Context.invoke at 0x7fe365efdc60>
└ <click.core.Context object at 0x7fe366296f90>
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
│ │ └ {'only_images': True, 'recursive': True, 'img_dirs': '/imgs/prn_420x240cm_color', 'workers': 1}
│ └ ()
└ <function main at 0x7fe360b4f4c0>
File "/usr/local/lib/python3.11/site-packages/thumbgen/thumbgen.py", line 94, in main
thumbnail_folder(dir_path=img_dir, workers=workers, only_images=only_images, recursive=recursive)
│ │ │ │ │ │ │ └ True
│ │ │ │ │ │ └ True
│ │ │ │ │ └ True
│ │ │ │ └ True
│ │ │ └ 1
│ │ └ 1
│ └ PosixPath('/imgs/prn_420x240cm_color')
└ <function thumbnail_folder at 0x7fe360b4ef20>
File "/usr/local/lib/python3.11/site-packages/thumbgen/thumbgen.py", line 56, in thumbnail_folder
list(tqdm(p.imap(make_thumbnail, all_files), total=len(all_files)))
│ │ │ │ │ └ ['/imgs/prn_420x240cm_color/410x240cm_srgb_023_20211218_144233.jpg']
│ │ │ │ └ ['/imgs/prn_420x240cm_color/410x240cm_srgb_023_20211218_144233.jpg']
│ │ │ └ <function make_thumbnail at 0x7fe364580a40>
│ │ └ <function Pool.imap at 0x7fe360b88540>
│ └ <multiprocessing.pool.Pool state=TERMINATE pool_size=1>
└ <class 'tqdm.std.tqdm'>
File "/usr/lib/python3.11/site-packages/tqdm/std.py", line 1195, in iter
for obj in iterable:
└ <multiprocessing.pool.IMapIterator object at 0x7fe364718e90>
File "/usr/lib64/python3.11/multiprocessing/pool.py", line 873, in next
raise value
└ GLib.Error('Child process exited with code 1', 'g-spawn-exit-error-quark', 1)
gi.repository.GLib.GError: g-spawn-exit-error-quark: Child process exited with code 1 (1)
it seems it only generates normal thumbnails. there seems to be no option to generate large thumbnails :(
Collecting thumbgen
Using cached https://files.pythonhosted.org/packages/8a/92/4a22302cad2e29762428dde74eb681f7615735aa5ae49895e2c2eb700fd1/thumbgen-0.1.1-py3-none-any.whl
Collecting tqdm<5.0,>=4.36 (from thumbgen)
Using cached https://files.pythonhosted.org/packages/e1/c1/bc1dba38b48f4ae3c4428aea669c5e27bd5a7642a74c8348451e0bd8ff86/tqdm-4.36.1-py2.py3-none-any.whl
Requirement already satisfied: click<8.0,>=7.0 in /home/soumendra/.miniconda/envs/visualsearch/lib/python3.7/site-packages (from thumbgen) (7.0)
Collecting loguru<0.4.0,>=0.3.2 (from thumbgen)
Using cached https://files.pythonhosted.org/packages/d5/db/669c5927e31c47c1cf5beef7ee784cc5fe88f95f47a86c5814a4f3de45f6/loguru-0.3.2-py3-none-any.whl
Collecting PyGObject<4.0,>=3.34 (from thumbgen)
Using cached https://files.pythonhosted.org/packages/46/8a/b183f3edc812d4d28c8b671a922b5bc2863be5d38c56b3ad9155815e78dd/PyGObject-3.34.0.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting pycairo>=1.11.1 (from PyGObject<4.0,>=3.34->thumbgen)
Building wheels for collected packages: PyGObject
Building wheel for PyGObject (PEP 517): started
Building wheel for PyGObject (PEP 517): finished with status 'error'
Running setup.py clean for PyGObject
Failed to build PyGObject
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.