Liquidsoap is a statically typed scripting general-purpose language with dedicated operators and backend for all thing media, streaming, file generation, automation, HTTP backend and more.
2024/09/23 20:40:47 [request.dynamic:2] Failed to obtain a media request: Failure("Internal error: variable time_in_mod not in environment.")
The following script works with version 2.2.5.
It works with 2.3.0-rc1 if I remove the if daytime() line.
Steps to reproduce
I get the error with this script:
daytime = time.predicate("9h-21h")
def get_next_track()
is_day = ref("")
if daytime() then is_day := "--day" end
track = process.read("python3 get_next_track.py #{is_day()}")
request.create(track)
end
main = request.dynamic(get_next_track)
output(mksafe(main))
But this one works:
daytime = time.predicate("9h-21h")
def get_next_track()
is_day = ref("")
track = process.read("python3 get_next_track.py #{is_day()}")
request.create(track)
end
main = request.dynamic(get_next_track)
output(mksafe(main))
Expected behavior
request.dynamic should get a file to play.
Liquidsoap version
Liquidsoap 2.3.0-rc1
Copyright (c) 2003-2024 Savonet team
Liquidsoap is open-source software, released under GNU General Public License.
See <http://liquidsoap.info> for more information.
Description
With 2.3.0-rc1 release, I have this error:
2024/09/23 20:40:47 [request.dynamic:2] Failed to obtain a media request: Failure("Internal error: variable time_in_mod not in environment.")
The following script works with version 2.2.5.
It works with 2.3.0-rc1 if I remove the if daytime() line.
Steps to reproduce
I get the error with this script:
But this one works:
Expected behavior
request.dynamic should get a file to play.
Liquidsoap version
Liquidsoap build config
Installation method
From official packages in the release artifacts
Additional Info
system used: Debian GNU/Linux 12 (bookworm)