Closed tomas closed 2 years ago
:+1: I get the same here ...
Ping @sickill :)
I got the same error message when passing an asciinema.org URL. However, after looking into it, there doesn't appear to be a version 3 of the asciicast format and when I run asciinema --version
locally, it showed I have version 2.0.0 which should be using the asciicast v2 format.
Hence, I realized we're just passing URLs that don't resolve to asciicast files. If you append .cast
to the asciinema.org URL, then asciicast2gif should work. Try:
asciicast2gif https://asciinema.org/a/AsPWpL1qCvInbNAAVBfbDfRhy.cast output.gif
Perhaps a better error message in this case or support for asciinema.org URLs would be good enhancements.
@dhimmel It didn't work for me.
It didn't work for me.
It would be helpful to see the command you ran and the output that was provided.
It doesn't seem to work:
~/repos/xtigyro/deploy-kubernetes-kind # asciicast2gif https://asciinema.org/a/348726.cast demo.gif
==> Loading https://asciinema.org/a/348726.cast...
==> Spawning PhantomJS renderer...
/usr/local/lib/node_modules/asciicast2gif/main.js:697
Qe)}function ep(a){try{var b=a[0];return b.h?b.h(a):b.call(null,a)}catch(c){if(c instanceof Object)throw b=c,Yo(a[6]),b;throw c;}}function fp(a,b,c){c=Zo(c,dp(function(c){a[2]=c;a[1]=b;return ep(a)}));return r(c)?(a[2]=Nb(c),a[1]=b,dj):null}function gp(a,b){a=a[6];null!=b&&a.Dc(null,b,dp(function(){return function(){return null}}(a)));Yo(a);return a}
^
TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object
at validateString (internal/validators.js:125:11)
at normalizeSpawnArguments (child_process.js:411:3)
at spawn (child_process.js:545:16)
at Function.exports.exec (/usr/local/lib/node_modules/asciicast2gif/node_modules/phantomjs-prebuilt/lib/phantomjs.js:72:10)
at Ke (/usr/local/lib/node_modules/asciicast2gif/main.js:262:219)
at Je (/usr/local/lib/node_modules/asciicast2gif/main.js:261:410)
at Ie (/usr/local/lib/node_modules/asciicast2gif/main.js:261:320)
at He (/usr/local/lib/node_modules/asciicast2gif/main.js:261:238)
at Le (/usr/local/lib/node_modules/asciicast2gif/main.js:266:230)
at xp (/usr/local/lib/node_modules/asciicast2gif/main.js:705:224)
This seems to be a different problem - even though I've followed the default install steps on Ubuntu 20.04 - the aforementioned error occurs.
However, using the Docker container did the job well:
~/repos/xtigyro/deploy-kubernetes-kind # docker run --rm -v $PWD:/data asciinema/asciicast2gif https://asciinema.org/a/348726.cast demo.gif
==> Loading https://asciinema.org/a/348726.cast...
==> Spawning PhantomJS renderer...
==> Generating frame screenshots...
==> Combining 871 screenshots into GIF file...
==> Done.
@Xtigyro
This seems to be a different problem - even though I've followed the default install steps on Ubuntu 20.04 - the aforementioned error occurs.
However, using the Docker container did the job well:
~/repos/xtigyro/deploy-kubernetes-kind # docker run --rm -v $PWD:/data asciinema/asciicast2gif https://asciinema.org/a/348726.cast demo.gif ==> Loading https://asciinema.org/a/348726.cast... ==> Spawning PhantomJS renderer... ==> Generating frame screenshots... ==> Combining 871 screenshots into GIF file... ==> Done.
Were you able to find a solution?
@Zonalds Yeah - just use the Docker image.
Try asciicast2gif's successor - https://github.com/asciinema/agg - it handles content type negotiation fine without the extension in URL.
Hi, I'm trying to run
asciicast2gif
against a recording I just posted online, but I'm getting the following output:Running locally it doesn't work, as well:
Any pointers? Thanks!