facebook/duckling

After install and all 349 test passed, the first actual curl request just hangs forever?

Closed this issue · 4 comments

I just did a fresh install, just as the install directions specify, and it seems that all the tests ran ok. But when I do an actual curl, after all the tests run, it just hangs with no return, here a partial transcript. Nothing happens after that last line (the request)

 RU Tests
    Corpus Tests:              OK
  TR Tests
    Corpus Tests:              OK
  ZH Tests
    Corpus Tests:              OK
Url Tests
  Corpus Tests:                OK
  Negative Corpus Tests:       OK
  Surround Tests:              OK

Engine Tests
Empty Regex Test: OK
Unicode and Regex Test: OK

All 349 tests passed (3.12s)

duckling > Test suite duckling-test passed
Completed 11 action(s).
no port specified, defaulting to port 8000
Listening on http://0.0.0.0:8000
curl -XPOST http://localhost:8000/parse --data 'locale=en_GB&text=tomorrow at eight'

Can you try invoking curl with --verbose and see what it spits out?

I can't reproduce.

First, I started the example application, then, in a new terminal window:

❯ curl -XPOST http://localhost:8000/parse --data 'locale=en_GB&text=tomorrow at eight' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:100   347    0   312  100    35  24000   2692 --:--:-- --:--:-- --:--:-- 28916
[
  {
    "body": "tomorrow at eight",
    "start": 0,
    "value": {
      "values": [
        {
          "value": "2021-03-14T08:00:00.000-08:00",
          "grain": "hour",
          "type": "value"
        },
        {
          "value": "2021-03-14T20:00:00.000-07:00",
          "grain": "hour",
          "type": "value"
        }
      ],
      "value": "2021-03-14T08:00:00.000-08:00",
      "grain": "hour",
      "type": "value"
    },
    "end": 17,
    "dim": "time",
    "latent": false
  }
]

Any updates, @LiNengRan?

I think you CURLed in the same terminal while duckling was running, which definitely won't work since duckling 1) doesn't listen to stdin 2) isn't a terminal.

If I am wrong and the issue persists for you (when curling in a separate terminal) feel free to re-open and let me know.