Skip to content

[clock.main:4] Source playlist failed while streaming: Pcre.Error(_)! #2406

Answered by ChoiZ
ChoiZ asked this question in Q&A
Discussion options

You must be logged in to vote

Error was due to string.replace in this piece of code:

def log_song(m)
  artist = m["artist"]
  title = m["title"]
  # remove .mp3
  title = string.replace(pattern=file.extension(title), fun (_) -> "", title) # <<< this line
  file.write(append=false, data="#{artist} - #{title}\n", "current.txt")
end

I don't use this code for now so I have removed it.

Thanks @toots you solved my problem.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@ChoiZ
Comment options

@toots
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ChoiZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants