Skip to content
This repository has been archived by the owner on Nov 12, 2018. It is now read-only.

Upon restarting bot, saved songs on queue will not play #13

Open
ghost opened this issue May 13, 2017 · 8 comments
Open

Upon restarting bot, saved songs on queue will not play #13

ghost opened this issue May 13, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented May 13, 2017

WARNING: Failed to get entry, retrying Traceback (most recent call last): File "/usr/src/musicbot/musicbot/player.py", line 346, in _play entry = await self.playlist.get_next_entry() File "/usr/src/musicbot/musicbot/playlist.py", line 397, in get_next_entry return await entry.get_ready_future() File "/usr/src/musicbot/musicbot/entry.py", line 184, in _download extractor = os.path.basename(self.expected_filename).split('-')[0] File "/usr/lib/python3.6/posixpath.py", line 144, in basename p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType Traceback (most recent call last): File "/usr/src/musicbot/musicbot/entry.py", line 184, in _download extractor = os.path.basename(self.expected_filename).split('-')[0] File "/usr/lib/python3.6/posixpath.py", line 144, in basename p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType Traceback (most recent call last): File "/usr/src/musicbot/musicbot/entry.py", line 184, in _download extractor = os.path.basename(self.expected_filename).split('-')[0] File "/usr/lib/python3.6/posixpath.py", line 144, in basename p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType Future exception was never retrieved future: <Future finished exception=TypeError('expected str, bytes or os.PathLike object, not NoneType',)> Traceback (most recent call last): File "/usr/src/musicbot/musicbot/entry.py", line 184, in _download extractor = os.path.basename(self.expected_filename).split('-')[0] File "/usr/lib/python3.6/posixpath.py", line 144, in basename p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType

@TBK
Copy link
Owner

TBK commented May 14, 2017

Hi, the issue is that the song file name the bot is looking for is not existing:
"/usr/src/musicbot/musicbot/entry.py", line 184, in _download extractor = os.path.basename(self.expected_filename).split('-')[0] File "/usr/lib/python3.6/posixpath.py", line 144, in basename p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType

The queue is saved in a json file (queue.json) located in "/usr/src/musicbot/data/xxxxxxxxxxxxxxxxxx/"

It might be caused by a mismatch between the file name stored in the json file and the files real name (usr/src/musicbot/audio_cache/)

Would it be possible to provide me with a dump of the queue.json and list of the audio_cache content (ls > audio_cache.txt)?

@ghost
Copy link
Author

ghost commented May 14, 2017

Hmm, I don't I will be able to because there is no other directories in "/usr/src".
It might be because I deleted the container/image and recreated the whole thing again.

Another factor that might have caused is this is because I made it so the bot deletes the audio cache after it finishes playing the song in the queue - by restarting the bot it then caused this error since the cached files are gone.

@TBK
Copy link
Owner

TBK commented May 14, 2017

Seems setting SaveVideos = no is the issue.

As of yet, I do not have a solution.

@ghost
Copy link
Author

ghost commented May 14, 2017

Alright, at least we got that issue solved.

TBK pushed a commit that referenced this issue May 15, 2017
Queued files are now redownloaded if deleted by "SaveVideos = no".
@TBK
Copy link
Owner

TBK commented May 15, 2017

I have pushed a fix. Try to grab the new docker image and see if it doesn't resolve the issue for you :)
docker run -d --name musicbot DiscordMusicBot/MusicBot

@ghost
Copy link
Author

ghost commented May 15, 2017

Will check it out as soon as I have free time :)

@ghost
Copy link
Author

ghost commented May 16, 2017

Do you have a discord server for testing? I would be willing to help around to test new features.

@TBK
Copy link
Owner

TBK commented May 16, 2017

Yup, https://discord.gg/kfxaSme

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant