Page MenuHomePhabricator

invalid literal for int() with base 10:
Closed, ResolvedPublic

Description

I see the VIPS engine doing that for PNG requests:

wget http://127.0.0.1:8800/wikipedia/hu/thumb/4/4e/Otrs-admin.png/180px-Otrs-admin.png

Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: thumbor:ERROR ERROR: Traceback (most recent call last):
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: File "/usr/lib/python2.7/dist-packages/thumbor/handlers/__init__.py", line 111, in get_image
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: self.context.request.image_url
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: value = future.result()
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: raise_exc_info(self._exc_info)
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 879, in run
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: yielded = self.gen.send(value)
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: File "/usr/lib/python2.7/dist-packages/thumbor/handlers/__init__.py", line 525, in _fetch
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: self.context.request.engine.load(fetch_result.buffer, extension)
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: File "/usr/lib/python2.7/dist-packages/wikimedia_thumbor/engine/proxy/proxy.py", line 102, in load
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: enginename = self.select_engine()
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: File "/usr/lib/python2.7/dist-packages/wikimedia_thumbor/engine/proxy/proxy.py", line 63, in select_engine
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: if engine.should_run(self.lcl['buffer']):
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: File "/usr/lib/python2.7/dist-packages/wikimedia_thumbor/engine/vips/vips.py", line 80, in should_run
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: self.context.vips['width'] = int(size[0])
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: ValueError: invalid literal for int() with base 10: ''
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: thumbor:ERROR [BaseHandler] get_image failed for url `http%3A//ms-fe.svc.eqiad.wmnet/v1/AUTH_mw/wikipedia-hu-local-public.4e/4/4e/Otrs-admin.png`. error: `invalid literal for int() with base 10: ''`
Sep  8 11:18:28 thumbor1001 thumbor@8816[20745]: tornado.access:ERROR 500 GET /wikipedia/hu/thumb/4/4e/Otrs-admin.png/180px-Otrs-admin.png (127.0.0.1) 3198.22ms

At first glance it seems like the VIPS engine can't get the dimensions of the image to decide whether it'll run on it or not.

Revisions and Commits

Event Timeline

I bet this is actually due to the cgroup thing, which makes the exiftool call fail silently. As far as I can see in the exiftool runner, we don't do anything with the stderr, we don't even log it.

Definitely fixed since the cgroup issue was resolved