asciinema / asciicast2gif

Generate GIF animations from asciicasts (asciinema recordings)
MIT License
1.21k stars 82 forks source link

TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string #77

Closed xdb64 closed 2 years ago

xdb64 commented 3 years ago

I tried installing asciicast2gif via both Docker and npm, however I get this:

$ sudo asciicast2gif /tmp/tmphnl6gqdg-ascii.cast /home/alex/Desktop/hstr-rs.gif
[sudo] password for alex: 
==> Loading /tmp/tmphnl6gqdg-ascii.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)

I'm on Xubuntu 20.04 LTS.

hq6 commented 3 years ago

I'm also seeing this issue.

jacklanda commented 3 years ago

same error to me, ditto

xdb64 commented 3 years ago

The project is obviously abandoned.

jacklanda commented 3 years ago

The project is obviously abandoned.

okay then, quite right :-(

foubian commented 2 years ago

to get a gif image from a .cast file generated with asciinema you can use this tool i develooped to make this task easly : https://github.com/foubian/cast2gif

ku1ik commented 2 years ago

The project is obviously abandoned.

There were different priorities indeed. Also, given the amount of problems asciicast2gif has I decided to approach the problem of gif generation differently and start from scratch. The result is https://github.com/asciinema/agg which is a successor to asciicast2gif, feel free to try it out.