Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 407
    • Issues 407
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Issues
  • #857
Closed
Open
Issue created Jun 13, 2019 by Rodrigo Leite@KazeContributor

"This backend doesn't support absolute paths" when uploading certain tracks

Steps to reproduce

  1. Visit the uploads page
  2. Upload the specified files

What happens?

Server error, with the following traceback:

Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]: 2019-06-13 04:31:29,383 ERROR    Internal Server Error: /api/v1/uploads/
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]: Traceback (most recent call last):
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     response = get_response(request)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 115, in _get_response
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     response = self.process_exception_by_middleware(e, request)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 113, in _get_response
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     response = wrapped_callback(request, *callback_args, **callback_kwargs)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/usr/lib/python3.5/contextlib.py", line 30, in inner
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     return func(*args, **kwds)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     return view_func(*args, **kwargs)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/rest_framework/viewsets.py", line 116, in view
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     return self.dispatch(request, *args, **kwargs)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/rest_framework/views.py", line 495, in dispatch
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     response = self.handle_exception(exc)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/rest_framework/views.py", line 455, in handle_exception
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     self.raise_uncaught_exception(exc)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/rest_framework/views.py", line 492, in dispatch
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     response = handler(request, *args, **kwargs)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/rest_framework/mixins.py", line 21, in create
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     self.perform_create(serializer)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "./funkwhale_api/music/views.py", line 438, in perform_create
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     upload = serializer.save()
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/rest_framework/serializers.py", line 214, in save
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     self.instance = self.create(validated_data)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/rest_framework/serializers.py", line 943, in create
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     instance = ModelClass._default_manager.create(**validated_data)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/models/manager.py", line 82, in manager_method
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     return getattr(self.get_queryset(), name)(*args, **kwargs)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/models/query.py", line 422, in create
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     obj.save(force_insert=True, using=self.db)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "./funkwhale_api/music/models.py", line 773, in save
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     self.mimetype = utils.guess_mimetype(self.audio_file)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "./funkwhale_api/music/utils.py", line 15, in guess_mimetype
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     mt, _ = mimetypes.guess_type(f.path)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/models/fields/files.py", line 57, in path
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     return self.storage.path(self.name)
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:   File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/django/core/files/storage.py", line 109, in path
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]:     raise NotImplementedError("This backend doesn't support absolute paths.")
Jun 13 04:31:29 ubuntu-s-1vcpu-1gb-sfo2-01 daphne[2389]: NotImplementedError: This backend doesn't support absolute paths.

What is expected?

Upload should be successful, as both files are playable and properly tagged.

Context

Funkwhale version(s) affected: 0.19.0-rc1+git.e3b0efb2 Instance configuration: Non-docker, nginx, using s3 as storage

Important to note that these are the only files that are affected. Weirdly enough, they're both by the artist Kim Petras. Could be a coincidence or not, I'm not sure.

As both files are over 10MBs in size, I cannot attach them. Sending a wetransfer link instead, with the issue marked as private.

wetransfer link redacted

Edited Jun 13, 2019 by Agate
Assignee
Assign to
Time tracking