Git Product home page Git Product logo

blog's People

Contributors

kpassapk avatar

Watchers

 avatar

blog's Issues

"Error (org-babel): Error reading results: (end-of-file)" Running Example in literate2 Article

First, I just wanted to say that this is an excellent article on a topic that really speaks to me. I would love replace tools like Postman with org-mode and org-babel and have had issues tying it all together in the past.

I copied the first two REST-related source blocks from your article like so:

#+NAME: restclient
#+begin_src restclient :results value
POST http://httpbin.org/post
Content-Type: application/json

{
    "jql": "project = HSP",
    "startAt": 0,
    "maxResults": 15,
    "fields": [
        "summary",
        "status",
        "assignee"
    ]
}
#+end_src

#+begin_src sh :stdin restclient :wrap src json
jq -r .data
#+end_src

When I execute the first code block by itself I see output printed to the buffer, but when I run the second code block I get this warning with no additional output:

Error (org-babel): Error reading results: (end-of-file)

When I check my *Messages* buffer I see the following output:

executing Restclient code block (restclient)...
executing Restclient source code block
HTTP POST http://httpbin.org/post Headers:[((Content-Type . application/json))] Body:[{
    "jql": "project = HSP",
    "startAt": 0,
    "maxResults": 15,
    "fields": [
        "summary",
        "status",
        "assignee"
    ]
}]
Contacting host: httpbin.org:80
"{
  \"args\": {},
  \"data\": \"{\\n    \\\"jql\\\": \\\"project = HSP\\\",\\n    \\\"startAt\\\": 0,\\n    \\\"maxResults\\\": 15,\\n    \\\"fields\\\": [\\n        \\\"summary\\\",\\n        \\\"status\\\",\\n        \\\"assignee\\\"\\n    ]\\n}\",
  \"files\": {},
  \"form\": {},
  \"headers\": {
    \"Accept\": \"*/*\",
    \"Accept-Encoding\": \"gzip\",
    \"Content-Length\": \"149\",
    \"Content-Type\": \"application/json\",
    \"Extension\": \"Security/Digest Security/SSL\",
    \"Host\": \"httpbin.org\",
    \"Mime-Version\": \"1.0\",
    \"X-Amzn-Trace-Id\": \"Root=1-628d016f-3878cbe630d6c2f137b2f8e2\"
  },
  \"json\": {
    \"fields\": [
      \"summary\",
      \"status\",
      \"assignee\"
    ],
    \"jql\": \"project = HSP\",
    \"maxResults\": 15,
    \"startAt\": 0
  },
  \"origin\": \"192.70.191.1\",
  \"url\": \"http://httpbin.org/post\"
}
"
Code block produced no output.

So clearly some output is being generated but the second code block doesn't seem to be able to read it.

Is there a step that I'm missing?

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.