Comments (11)
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.
👍 I get the same here ...
from asciicast2gif.
@dhimmel is correct, right now you need to add .cast
(or .json
) ext to the URL, since asciicast2gif can't resolve it.
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.
Ping @sickill :)
from asciicast2gif.
@dhimmel It didn't work for me.
from asciicast2gif.
It didn't work for me.
It would be helpful to see the command you ran and the output that was provided.
from asciicast2gif.
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.
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.
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.
@Zonalds Yeah - just use the Docker image.
from asciicast2gif.
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)
- Produced GIF freezes when played HOT 1
- Object has no method 'execSync' HOT 2
- [FR] Add option to specify working/tmp directory HOT 2
- Docker executable cannot read a file (ENOENT) HOT 4
- [FR] change temp dir (improve documentation) HOT 2
- Cache resources exhausted when converting to gif HOT 3
- Fails with ERR_STREAM_DESTROYED HOT 1
- Option to add a delay to the last frame HOT 1
- TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string HOT 6
- Certian grey text won't show HOT 1
- Fails with error write EPIPE on local file HOT 17
- [why?] HOT 7
- wsl install erro HOT 1
- Add margins to generated GIFs HOT 1
- [bug] Error: certificate has expired HOT 4
- FontFaceOnload error HOT 1
- <input-json-path-or-url> HOT 1
- cnpm install asciicast2gif error HOT 2
- cant display chinese HOT 1
- asciinema2gif: convert-im6.q16: cache resources exhausted HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciicast2gif.