On 02/27/2018 02:13 AM, Kartik Patel wrote:
Hello Marcus,

During my testing, I think, I set the time.sleep function by try and error. I didn't check for different PC. I will update it after testing it on my too slow AWS may be.

Also, this resize issue is because Bokeh stopped the support of resize feature. If you can, use Bokeh V0.12.6, and tornado v4.4. I have to Port the code to recent Bokeh version.

Thanks for the extensive verifications. I will try to update the basic suggestions this weekend probably.



On Tue, Feb 27, 2018, 1:06 AM Marcus D. Leech <[email protected] <mailto:[email protected]>> wrote:

    On 02/27/2018 01:25 AM, Marcus D. Leech wrote:
    On 02/27/2018 12:15 AM, Kartik Patel wrote:
    Hello Marcus,

    Just for starters, make sure you have v3.7.12 of GNU Radio. In
    particular, your GR should contain the commit `/3c989f9`./ Also,
    make sure you select Bokeh GUI instead of QT GUI in /Generate
    Options/ field in /Options/ block. For Bokeh GUI we have a
    different `main()` function template that has necessary
    procedure to start the server and the stream.

    Also, thank you very much for the suggestions about the vector
    plotter. In addition to the vector plotter, the Histogram
    plotter and BER curve are also in pipeline. I am too busy with
    several deadlines and projects. But I will try to incorporate
    the things as soon as possible (maybe in summer). Sorry for the
    loong promise!

    Let me know if you still have trouble working with the module.

    Thanks.

    Regards,
    Kartik Patel
    Thanks for the very-prompt response. I know that you're probably
    very busy.

    I managed to get to the point of GRC generating the correct
    startup code, with the "Bokeh GUI". My repo was up-to-date, it's
    just that I hadn't actually built it.  Too many distractions...

    But when I got to start now, I get:

    Traceback (most recent call last):
      File "./top_block.py", line 153, in <module>
        main()
      File "./top_block.py", line 136, in main
        url = "http://localhost:"; <http://localhost:> + port +
    "/bokehgui")
      File "/usr/lib/python2.7/site-packages/bokeh/util/api.py", line
    190, in wrapper
        return obj(*args, **kw)
      File
    "/usr/lib/python2.7/site-packages/bokeh/client/session.py", line
    161, in push_session
        session.push(document)
      File "/usr/lib/python2.7/site-packages/bokeh/util/api.py", line
    190, in wrapper
        return obj(*args, **kw)
      File
    "/usr/lib/python2.7/site-packages/bokeh/client/session.py", line
    370, in push
        raise IOError("Cannot push session document because we failed
    to connect to the server (to start the server, try the 'bokeh
    serve' command)")
    IOError: Cannot push session document because we failed to
    connect to the server (to start the server, try the 'bokeh serve'
    command)
    I can get past this error by setting a longer "time.sleep()" in
    the generated "main" -- I guess it takes a bit for the server to
    come up to a state where it can accept connections.

    But now:

     File "./top_block.py", line 140, in main
        tb = top_block_cls(doc)
      File "./top_block.py", line 65, in __init__
        legend_list = legend_list)
      File
    "/usr/local/lib64/python2.7/site-packages/bokehgui/freq_sink_f.py", line
    63, in initialize
        active_scroll = 'ywheel_zoom', )
      File
    "/usr/lib/python2.7/site-packages/bokeh/plotting/figure.py", line
    793, in figure
        return Figure(**kwargs)
      File
    "/usr/lib/python2.7/site-packages/bokeh/plotting/figure.py", line
    149, in __init__
        tool_objs, tool_map = _process_tools_arg(self, opts.tools)
      File
    "/usr/lib/python2.7/site-packages/bokeh/plotting/helpers.py", line
    530, in _process_tools_arg
        tool_obj = _tool_from_string(tool)
      File
    "/usr/lib/python2.7/site-packages/bokeh/plotting/helpers.py", line
    467, in _tool_from_string
        raise ValueError("unexpected tool name '%s', %s tools are %s"
    % (name, text, nice_join(matches)))
    ValueError: unexpected tool name 'resize', similar tools are reset



    _______________________________________________
    Discuss-gnuradio mailing list
    [email protected] <mailto:[email protected]>
    https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

OK, so, I removed the reference to 'resize' in the default tools list. Now, it's complaining about nodejs:

[mleech@laptop ~]$ ./top_block.py
Port is set to 5007

['bokeh', 'serve', '--port', '5007', '--allow-websocket-origin=*', '/usr/local/lib64/python2.7/site-packages/bokehgui/plots/bokehgui.py']
Port in main is 5007
Pid is 14986
2018-02-27 11:47:54,580 Starting Bokeh server version 0.12.14 (running on Tornado 4.5.3) 2018-02-27 11:47:54,583 Host wildcard '*' will allow connections originating from multiple (or possibly all) hostnames or IPs. Use non-wildcard values to restrict access explicitly
2018-02-27 11:47:54,594 Bokeh app running at: http://localhost:5007/bokehgui
2018-02-27 11:47:54,594 Starting Bokeh server with process id: 14986
2018-02-27 11:47:55,039 101 GET /bokehgui/ws?bokeh-protocol-version=1.0&bokeh-session-id=top_block (127.0.0.1) 2.38ms
2018-02-27 11:47:55,039 WebSocket connection opened
2018-02-27 11:47:55,045 ServerConnection created
INFO: Audio sink arch: alsa
/usr/lib/python2.7/site-packages/bokeh/client/session.py:316: UserWarning:

    !!!! PLEASE NOTE !!!!

The use of `session.loop_until_closed` and `push_session` to run Bokeh
application code outside a Bokeh server is **HIGHLY DISCOURAGED** for any real
use.

Running application code outside a Bokeh server with bokeh.client in this way
has (and always will have) several intrinsic drawbacks:

* Fast binary array transport is NOT available! Base64 fallback is much slower
* All network traffic is DOUBLED due to extra hop between client and server
* Server *and* client process must be running at ALL TIMES for callbacks to work * App code run outside the Bokeh server is NOT SCALABLE behind a load balancer

The bokeh.client API is recommended to use ONLY for testing, or for customizing individual sessions running in a full Bokeh server, before passing on to viewers.

For information about different ways of running apps in a Bokeh server, see:

    http://bokeh.pydata.org/en/latest/docs/user_guide/server.html

  warnings.warn(_BOKEH_CLIENT_APP_WARNING_FULL)
2018-02-27 11:48:02,506 Uncaught exception GET /bokehgui?bokeh-session-id=top_block (127.0.0.1) HTTPServerRequest(protocol='http', host='localhost:5006', method='GET', uri='/bokehgui?bokeh-session-id=top_block', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Accept-Language': 'en-US,en;q=0.5', 'Accept-Encoding': 'gzip, deflate', 'Host': 'localhost:5006', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'User-Agent': 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0', 'Connection': 'keep-alive'})
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/tornado/web.py", line 1512, in _execute
    result = yield result
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 1069, in run
    yielded = self.gen.send(value)
File "/usr/lib/python2.7/site-packages/bokeh/server/views/doc_handler.py", line 26, in get
    template_variables=session.document.template_variables)
File "/usr/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper
    return obj(*args, **kw)
File "/usr/lib/python2.7/site-packages/bokeh/embed/server.py", line 231, in server_html_page_for_session return html_page_for_render_items(bundle, {}, render_items, title, template=template, template_variables=template_variables) File "/usr/lib/python2.7/site-packages/bokeh/util/api.py", line 190, in wrapper
    return obj(*args, **kw)
File "/usr/lib/python2.7/site-packages/bokeh/embed/util.py", line 147, in html_page_for_render_items
    script = bundle_all_models()
File "/usr/lib/python2.7/site-packages/bokeh/util/compiler.py", line 514, in bundle_all_models _bundle_cache[key] = bundle = bundle_models(Model.model_class_reverse_map.values()) or "" File "/usr/lib/python2.7/site-packages/bokeh/util/compiler.py", line 400, in bundle_models
    compiled = nodejs_compile(impl.code, lang=impl.lang, file=impl.file)
File "/usr/lib/python2.7/site-packages/bokeh/util/compiler.py", line 189, in nodejs_compile output = _run_nodejs([compilejs_script], dict(code=code, lang=lang, file=file)) File "/usr/lib/python2.7/site-packages/bokeh/util/compiler.py", line 168, in _run_nodejs
    return _run(_nodejs_path(), argv, input)
File "/usr/lib/python2.7/site-packages/bokeh/util/compiler.py", line 149, in _nodejs_path
    _nodejs = _detect_nodejs()
File "/usr/lib/python2.7/site-packages/bokeh/util/compiler.py", line 141, in _detect_nodejs
    '("conda install nodejs" or follow https://nodejs.org/en/download/)')
RuntimeError: node.js v6.10.0 or higher is needed to allow compilation of custom models ("conda install nodejs" or follow https://nodejs.org/en/download/) 2018-02-27 11:48:02,510 500 GET /bokehgui?bokeh-session-id=top_block (127.0.0.1) 71.08ms


_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to