Error in rest_translation_server.lua:105: attempt to index field 'preds' (a nil value) (500)

(Zuzanna Parcheta) #1

I am trying to run rest_translation_server.lua. I do it following the manual from the website:

I run the server and I receive the message:

th tools/rest_translation_server.lua -model ~/models/_epoch25_1.00.t7 -gpuid 1
[01/03/18 11:09:59 INFO] Using GPU(s): 1
[01/03/18 11:09:59 WARNING] The caching CUDA memory allocator is enabled. This allocator improves performance at the cost of a higher GPU memory usage. To optimize for memory, consider disabling it by setting the environment variable: THC_CACHING_ALLOCATOR=0
[01/03/18 11:09:59 INFO] Loading model
[01/03/18 11:09:59 INFO] Loading ‘/home/German/models/_epoch25_1.00.t7’…
[01/03/18 11:10:00 INFO] Model seq2seq trained on bitext
[01/03/18 11:10:00 INFO] Launch server
Xavante started on port(s) 7784

But when I make a curl I get the following error:

curl -v -H “Content-Type: application/json” -d ‘[{ “src” : “play zoo on spotify” }]’

  • Trying…
  • Connected to ( port 7784 (#0)

POST /translator/translate HTTP/1.1
User-Agent: curl/7.47.0
Accept: /
Content-Type: application/json
Content-Length: 35

  • upload completely sent off: 35 out of 35 bytes
    < HTTP/1.1 500 Internal Server Error
    < Content-Type: text/plain
    < Date: Wed, 03 Jan 2018 10:14:01 GMT
    < Server: RestServer
    < Content-Length: 193
  • Connection #0 to host left intact
    500 Internal Server Error - Error in application: tools/rest_translation_server.lua:105: unicode error in line tools/rest_translation_server.lua:98: attempt to index field ‘preds’ (a nil value)

Has anyone else get this error too? I instaled luarocks install restserver-xavante and luarocks install nn

(Vincent Nguyen) #2

are you on master ?

(Zuzanna Parcheta) #3

yes, I am on master.

(Vincent Nguyen) #4

try to check out on this hash and check if it works.

(Zuzanna Parcheta) #5

solved! It was solved in this commit