clementfarabet / gfx.js

A graphics backend for the browser (with a Torch7 client).
MIT License
125 stars 35 forks source link

_addHeaderLines is not a function error when first accessing server #44

Open elbamos opened 8 years ago

elbamos commented 8 years ago

I think this is pretty self-explanatory:

prompt:~/.gfx.js/static/data$ luajit -lgfx.go
[gfx.js] server started on port 8000, graphics will be rendered into http://localhost:8000
LuaJIT 2.1.0-alpha -- Copyright (C) 2005-2015 Mike Pall. http://luajit.org/

 _____              _
|_   _|            | |
  | | ___  _ __ ___| |__
  | |/ _ \| '__/ __| '_ \
  | | (_) | | | (__| | | |
  \_/\___/|_|  \___|_| |_|

JIT: ON SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
th> _http_common.js:124
      parser.incoming._addHeaderLines(headers, headers.length);
                      ^

TypeError: parser.incoming._addHeaderLines is not a function
    at HTTPParser.parserOnMessageComplete (_http_common.js:124:23)

th>

Any advice? Thanks!

soumith commented 8 years ago

I think that's the stdout/stderr coming from the browser process. You can probably ignore it. On another note, you should probably move to display: https://github.com/szym/display gfx.js is being phased out (I have to update the tutorials)

elbamos commented 8 years ago

@soumith Definitely not from the browser process -- if i start with lgfx.start, it gets thrown in the same console window as soon as the browser tries to access the port. The browser displays a blank page with the "light" tab on the right. Trying to open html directly from static/data, I get an empty shell with svg and png save buttons, but no actual charts.

Thanks for the pointer to display, i'll take a look!

soumith commented 8 years ago

@elbamos this is somewhat the reason why we are phasing out gfx.js, it has too much machinery for what is supposed to be super simple. display is lean, easy to install, better to use.

elbamos commented 8 years ago

@soumith Yeah took about a minute to switch to. That said, it wouldn't kill the author to include some useful chart examples.

Thanks!

soumith commented 8 years ago

@elbamos i'll work on it. all itorch Plots can be used in display with small changes (which I will send as a PR soon), and I think the bokeh plots from itorch's Plot.lua are nicer anyways (and are documented with usage).

elbamos commented 8 years ago

@soumith yeah they are nicer, but its rather difficult to get them output from a console session, no? itorch times out, at least for me, on neural net training operations that take longer than 15 minutes, which makes its display functions beside the point for my use case.

soumith commented 8 years ago

@elbamos the plotting system is independent of itorch altogether. iTorch does not even need to be installed or running. I'll finish that work in the next couple of days and make it compatible with display.