Giter Club home page Giter Club logo

Comments (11)

dhimmel avatar dhimmel commented on May 28, 2024 18

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.

from asciicast2gif.

funilrys avatar funilrys commented on May 28, 2024 2

👍 I get the same here ...

from asciicast2gif.

ku1ik avatar ku1ik commented on May 28, 2024 1

@dhimmel is correct, right now you need to add .cast (or .json) ext to the URL, since asciicast2gif can't resolve it.

asciicast

It would definitely be nice if it happened automatically. I plan to work on better content-type negotiation support on server side, this should solve this case then.

from asciicast2gif.

tomas avatar tomas commented on May 28, 2024

Ping @sickill :)

from asciicast2gif.

berkant avatar berkant commented on May 28, 2024

@dhimmel It didn't work for me.

from asciicast2gif.

dhimmel avatar dhimmel commented on May 28, 2024

It didn't work for me.

It would be helpful to see the command you ran and the output that was provided.

from asciicast2gif.

Xtigyro avatar Xtigyro commented on May 28, 2024

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)

from asciicast2gif.

Xtigyro avatar Xtigyro commented on May 28, 2024

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.

from asciicast2gif.

Zonalds avatar Zonalds commented on May 28, 2024

@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?

from asciicast2gif.

Xtigyro avatar Xtigyro commented on May 28, 2024

@Zonalds Yeah - just use the Docker image.

from asciicast2gif.

ku1ik avatar ku1ik commented on May 28, 2024

Try asciicast2gif's successor - https://github.com/asciinema/agg - it handles content type negotiation fine without the extension in URL.

from asciicast2gif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.