Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 398
    • Issues 398
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhale
  • funkwhalefunkwhale
  • Issues
  • #946
Closed
Open
Created Oct 16, 2019 by Steve Ryan@stryan

.m4a file import fails with "Unkown Error" when no embedded cover art

Steps to reproduce

  1. Upload a .m4a file without an embeded coverart image.

What happens?

Import fails during the processing stage with the following error:

{
    "source": "upload://01_Shofukan.m4a",
    "detail": null,
    "error_code": "unknown_error"
}

What is expected?

The file is uploaded and processed correctly.

Context

Funkwhale version(s) affected: Version 0.20.0+git.34ffab27

Installed using the Ansible role and running behind Nginx proxy. Hardware is a Raspberry Pi v4.

I see in the celery logs the following stacktrace:

Oct 15 21:21:58 celery[723]: Traceback (most recent call last):
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
Oct 15 21:21:58 celery[723]:     R = retval = fun(*args, **kwargs)
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
Oct 15 21:21:58 celery[723]:     return self.run(*args, **kwargs)
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/api/funkwhale_api/taskapp/celery.py", line 51, in inner
Oct 15 21:21:58 celery[723]:     return function(*args, **kwargs)
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/api/funkwhale_api/music/tasks.py", line 182, in process_upload
Oct 15 21:21:58 kitezh.lan celery[723]:     serializer.is_valid()
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/rest_framework/serializers.py", line 235, in is_valid
Oct 15 21:21:58 celery[723]:     self._validated_data = self.run_validation(self.initial_data)
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/rest_framework/serializers.py", line 430, in run_validation
Oct 15 21:21:58 celery[723]:     value = self.to_internal_value(data)
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/rest_framework/serializers.py", line 487, in to_internal_value
Oct 15 21:21:58 celery[723]:     validated_value = field.run_validation(primitive_value)
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/virtualenv/lib/python3.7/site-packages/rest_framework/fields.py", line 542, in run_validation
Oct 15 21:21:58 celery[723]:     value = self.to_internal_value(data)
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/api/funkwhale_api/music/metadata.py", line 535, in to_internal_value
Oct 15 21:21:58 celery[723]:     return data.get_picture("cover_front", "other")
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/api/funkwhale_api/music/metadata.py", line 425, in get_picture
Oct 15 21:21:58 celery[723]:     pictures = cleaner(pictures)
Oct 15 21:21:58 celery[723]:   File "/srv/funkwhale/api/funkwhale_api/music/metadata.py", line 94, in clean_mp4_pictures
Oct 15 21:21:58 celery[723]:     for p in list(raw_pictures):
Oct 15 21:21:58 celery[723]: TypeError: 'NoneType' object is not iterable

Uploading the same file with a coverart embedded in it works fine.

Edited Oct 16, 2019 by Steve Ryan
Assignee
Assign to
Time tracking