When a make-producer is given a #:source argument of a playlist, the following error is produced:
string->bytes/utf-8: contract violation
expected: string?
given: (playlist '#hash() #<procedure:temp419> '() #f #f #f #f #f #f #f (list (producer '#hash( ) #<procedure:temp269> '() #f "/home/benchung/Work/pliss/racket_video/../PLISS_Jun18_11-45-11.mov " #f #f #f #f #f) (producer '#hash() #<procedure:temp269> '() #f "/h...
context...:
/home/benchung/Work/pliss/racket_video/video-local/video/video/private/mlt.rkt:236:34
/home/benchung/Work/pliss/racket_video/video-local/video/video/private/video.rkt:180:29
/usr/share/racket/collects/racket/private/more-scheme.rkt:373:13: hash-ref!
/home/benchung/Work/pliss/racket_video/video-local/video/video/render.rkt:125:4: prepare metho d in render%
/home/benchung/Work/pliss/racket_video/video-local/video/video/private/video.rkt:294:2: for-lo op
/home/benchung/Work/pliss/racket_video/video-local/video/video/private/video.rkt:180:29
/usr/share/racket/collects/racket/private/more-scheme.rkt:373:13: hash-ref!
/home/benchung/Work/pliss/racket_video/video-local/video/video/render.rkt:125:4: prepare metho d in render%
/home/benchung/Work/pliss/racket_video/video-local/video/video/private/video.rkt:265:2: for-lo op
/home/benchung/Work/pliss/racket_video/video-local/video/video/private/video.rkt:180:29
/usr/share/racket/collects/racket/private/more-scheme.rkt:373:13: hash-ref!
/home/benchung/Work/pliss/racket_video/video-local/video/video/render.rkt:125:4: prepare metho d in render%
/home/benchung/Work/pliss/racket_video/video-local/video/video/render.rkt:62:0: render27
/usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt:397:3
This error, while expected (as source is expected to be a path, not a producer), is not very clear as to why and where the issue occurred. Rather, the #:source parameter should have a contract that guarantees that the passed argument is a string (and preferably also checks validity, too), making the root cause clearer to the user.
While I'm sure that Video needs much cleaner error messages. This particular error message is now no longer visible in v0.2. Please open new issues like it though. :)
When a make-producer is given a #:source argument of a playlist, the following error is produced:
This error, while expected (as source is expected to be a path, not a producer), is not very clear as to why and where the issue occurred. Rather, the #:source parameter should have a contract that guarantees that the passed argument is a string (and preferably also checks validity, too), making the root cause clearer to the user.