Created attachment 2756 [details] Toaster log showing error and stack trace when artifact link is clicked Artifact download links on build pages (at the URL /toastergui/build/X, where X is the build ID) don't link to artifacts correctly. To reproduce: 1. Run a build in Toaster (managed mode). 2. When the build is finished, go to the "all builds" page and click on the build's link in the "Latest builds" section. 3. In the build detail page, click on one of the artifact links: - License manifest > Download - Image files > any of the links to an image file - Other artifacts > any of the links to another artifact * Expected Download of file behind the link which was clicked. * Actual Error is thrown, with the following content (a full log showing the error is attached): TypeError at /toastergui/build/1/artifact/imagefile/id/1 'int' object is not iterable Request Method: GET Request URL: http://127.0.0.1:8000/toastergui/build/1/artifact/imagefile/id/1 Django Version: 1.6 Exception Type: TypeError Exception Value: 'int' object is not iterable Exception Location: /home/ell/toaster-run/toaster-env/lib/python2.7/site-packages/magic/compatability.py in iter_encode, line 40 Python Executable: /home/ell/toaster-run/toaster-env/bin/python Python Version: 2.7.5 Python Path: ['./bitbake/bin/../lib', '/home/ell/dev/toaster/poky-contrib/bitbake/lib', '/home/ell/dev/toaster/poky-contrib/bitbake/lib/toaster', '/home/ell/toaster-run/toaster-env/lib64/python27.zip', '/home/ell/toaster-run/toaster-env/lib64/python2.7', '/home/ell/toaster-run/toaster-env/lib64/python2.7/plat-linux2', '/home/ell/toaster-run/toaster-env/lib64/python2.7/lib-tk', '/home/ell/toaster-run/toaster-env/lib64/python2.7/lib-old', '/home/ell/toaster-run/toaster-env/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7', '/usr/lib/python2.7', '/home/ell/toaster-run/toaster-env/lib/python2.7/site-packages', '/home/ell/dev/toaster/poky-contrib/bitbake/lib/toaster/contrib/django-aggregate-if-master'] Server time: Tue, 22 Sep 2015 11:10:44 +0100 *** Note that this seems to be related to mime type lookup, so it would make sense to rationalise the code causing the error so it reuses the MimeTypeFinder in views.py.
Sent to toaster mailing list for review.
This was submitted to bitbake-devel 2015-10-07.
*** Bug 8472 has been marked as a duplicate of this bug. ***
This is not in poky master, so it shouldn't have been closed.
The necessary patches are dd957fe0f261db6481882fee0413f459425000c2 and ce9011a9dea4d4f8040170c28031cfbcadfbfd81 on poky master, if we decide to backport them.
Now made it upstream, so closing.
Verified on master: 505a82673ac2487df5ea343a6422c2fc47018831