beetbox / beetbox/beets

Web plugin fails to play tracks and produces error

Open
#5,070 2 comments 3 reactions 0 assignees View on GitHub
good first issue web
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem

Trying to play a track in the Web plugin fails and produces this error:

```
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/flask/app.py", line 1455, in wsgi_app
response = self.full_dispatch_request()
File "/home/user/.local/lib/python3.10/site-packages/flask/app.py", line 869, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/user/.local/lib/python3.10/site-packages/flask/app.py", line 867, in full_dispatch_request
rv = self.dispatch_request()
File "/home/user/.local/lib/python3.10/site-packages/flask/app.py", line 852, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/share/beets/beetsplug/web/__init__.py", line 324, in item_file
response = flask.send_file(
TypeError: send_file() got an unexpected keyword argument 'attachment_filename'
```

On an initial investigation, this appears related to: https://github.com/pallets/flask/pull/4667

### Setup

* OS: Pop!_OS
* Python version: 3.10.12
* beets version: 1.6.0

My configuration is:

```
directory: /home/user/Music

plugins: web
web:
host: 127.0.0.1
port: 8337
cors: ''
cors_supports_credentials: no
reverse_proxy: no
include_paths: no
readonly: yes
```

Contributor guide

Open the contributing guide

Research direction

Start in beetsplug/web/__init__.py at item_file, where the traceback shows the failing Flask send_file call. Check the Flask version compatibility for that call and verify that playing a track through the web plugin completes without the TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
backend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.