beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.74k stars 1.82k forks source link

play: "No such file or directory" on Windows #2208

Open cjwagner opened 7 years ago

cjwagner commented 7 years ago

Problem

Running this command in verbose (-vv) mode:

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:

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

Workaround batch script that I wrote:

@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:

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
sampsyo commented 7 years ago

Is this any better if you remove your configuration for the play plugin? In particular, it looks like the command setting is blank.

cjwagner commented 7 years ago

The command parameter is blank because i didnt specify one (the defualt of calling START should work). I tried specifying a command that i tested and made sure worked on its own but doesnt change the output of the play plugin

sampsyo commented 7 years ago

That's odd. And the verbose output is exactly the same when there's no configuration at all?

cjwagner commented 7 years ago

That is the output with no configuration at all. When i add the value for the command setting it shows up in the beet config output but doesnt work. The play command is producing the .m3u file properly its just not launching the playlist file with a command.

On Sep 25, 2016 11:18 PM, "Adrian Sampson" notifications@github.com wrote:

That's odd. And the verbose output is exactly the same when there's no configuration at all?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/beetbox/beets/issues/2208#issuecomment-249471169, or mute the thread https://github.com/notifications/unsubscribe-auth/AFFkgeYfKtksb5BauFbYh40IG4oh7bAQks5qtzl8gaJpZM4KF_xF .

sampsyo commented 7 years ago

That's strange! I'm not sure how to proceed—it looks like the plugin can't invoke start on your machine, but I can't see why. (And I don't have a Windows machine handy to try this on.)

Please check back in if you find any evidence that shows why the start invocation isn't working!

akindofcode commented 6 years ago

I have the same problem on Win 7, last version of beets... In my case, the command beets tries to launch is:

play: executing command: start ['C:\\Users\\AKINDO~1\\AppData\\Local\\Temp\\tmpb8mqiwjt.m3u'] error: Could not play the query: [Errno 2] No such file or directory

That command doesn't work when I launch it from the command line, but

start C:\\Users\\AKINDO~1\\AppData\\Local\\Temp\\tmpb8mqiwjt.m3u

works just fine

sampsyo commented 6 years ago

I think the root cause here is the same as in: https://github.com/beetbox/beets/pull/2717#issuecomment-340458002

And we need to use a more complex command to start the m3u file.