beetbox / beetbox/beets

play: "No such file or directory" on Windows

Open
#2,208 8 comments 0 reactions 0 assignees View on GitHub
bug play windows
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

### Problem

Running this command in verbose (`-vv`) mode:

``` sh
C:\Users\Cole>beet -vv play emancipator
user configuration: C:\Users\Cole\AppData\Roaming\beets\config.yaml
data directory: C:\Users\Cole\AppData\Roaming\beets
plugin paths: C:\Users\Cole\BeetsData\Plugins
Sending event: pluginload
library database: C:\Users\Cole\BeetsData\musiclibrary.blb
library directory: C:\Users\Cole\Music
Sending event: library_opened
Playing 29 tracks.
play: executing command: start c:\users\cole\appdata\local\temp\tmpkmt8dg.m3u
error: Could not play the query: [Errno 2] No such file or directory

C:\Users\Cole>start c:\users\cole\appdata\local\temp\tmpkmt8dg.m3u

C:\Users\Cole>
```

Led to this problem:

```
Playlist file is not played. However the command it says it is running is valid as it launches my music player when I run it seperately as shown above.
```
### Setup

My computer:
- OS: Win 10
- Python version: 2.7.5
- beets version: 1.3.19
- Turning off plugins made problem go away (yes/no): no

My roomate's computer also had the same exact issue.

Workaround batch script that I wrote:

``` sh
@echo off
set args=%*
beet play %args%
FOR /F "delims=" %%I IN ('DIR %temp%\*.m3u /B /O:D') DO SET newestfile=%%I
START %temp%\%newestfile%
```

My configuration (output of `beet config`) is:

``` yaml
threaded: yes
per_disc_numbering: no

clutter:
- Thumbs.DB
- .DS_Store
- '*.m3u'
- .pls
- '*.jpg'
library: C:\Users\Cole\BeetsData\musiclibrary.blb
ignore: [.*, '*~', System Volume Information]

ui:
color: yes
pluginpath: C:\Users\Cole\BeetsData\Plugins

plugins:
- fetchart
- missing
- duplicates
- play
directory: C:\Users\Cole\Music

import:
write: yes
autotag: yes
resume: ask
none_rec_action: ask
missing:
count: no
total: no
play:
warning_threshold: -2
use_folders: no
warning_treshold: 100
raw: no
command:
relative_to:
duplicates:
count: no
full: no
format: ''
keys: []
move: ''
tag: ''
path: no
copy: ''
tiebreak: {}
album: no
strict: no
checksum: ''
merge: no
delete: no
fetchart:
auto: yes
minwidth: 0
sources:
- filesystem
- coverart
- itunes
- amazon
- albumart
google_engine: 001442825323518660753:hrh5ch1gjzm
enforce_ratio: no
cautious: no
maxwidth: 0
store_source: no
google_key: REDACTED
fanarttv_key: REDACTED
cover_names:
- cover
- front
- art
- album
- folder

```

Contributor guide

Open the contributing guide

Research direction

Start with the beets `play` plugin entry point and reproduce `beet -vv play emancipator` on Windows 10 using the configuration shown. Trace the command that launches the generated `.m3u` playlist; done means the playlist is played without the `[Errno 2] No such file or directory` error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.