Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream and File extensions in conflict if stream/protocols config includes "file" #1248

Closed
jodal opened this issue Aug 12, 2015 · 2 comments
Closed
Assignees
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal

Comments

@jodal
Copy link
Member

jodal commented Aug 12, 2015

From https://discuss.mopidy.com/t/update-to-mopidy-1-1-mopidy-is-not-starting/835:

Aug 11 07:38:43 musik mopidy[24629]: File "/usr/lib/python2.7/dist-packages/mopidy/core/actor.py", line 166, in __init__
Aug 11 07:38:43 musik mopidy[24629]: ) % (scheme, name(b), name(backends_by_scheme[scheme]))
Aug 11 07:38:43 musik mopidy[24629]: AssertionError: Cannot add URI scheme file for FileBackend, it is already handled by StreamBackend

Lots of users have set the stream/protocols config themselves, so they still have file as a protocol that Mopidy-Stream should handle. As of Mopidy 1.1.0, we include a new Mopidy-File backend that claims the file protocol. This causes a conflict between the extensions, and Mopidy shuts down.

As a workaround for this quite common issue, we should filter out file from the values in stream/protocols.

@jodal jodal added the C-bug Category: This is a bug label Aug 12, 2015
@jodal jodal added this to the v1.1.1 - Bugfixes milestone Aug 12, 2015
@jodal jodal added C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal and removed C-bug Category: This is a bug labels Aug 12, 2015
@adamcik
Copy link
Member

adamcik commented Aug 12, 2015

We might also want to make this conditional on file being enabled.

jodal added a commit to jodal/mopidy that referenced this issue Aug 15, 2015
If Mopidy-File is enabled it handles playback of file:// URIs.

Mopidy-Stream used to do this, but in Mopidy 1.1 we removed "file" from
the default value of the stream/protocols config. However, many users
upgrading to Mopidy 1.1 have set stream/protocols to include "file" in
their existing config, and thus Mopidy fails to start because both
backends tries to claim the "file" protocol.

Fixes mopidy#1248
@jodal jodal self-assigned this Aug 15, 2015
jodal added a commit to jodal/mopidy that referenced this issue Aug 15, 2015
@jodal
Copy link
Member Author

jodal commented Aug 15, 2015

Fixed by #1254.

@jodal jodal closed this as completed Aug 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal
Projects
None yet
Development

No branches or pull requests

2 participants