Xi-CAM / Xi-cam.gui

0 stars 9 forks source link

Xi-cam crashes if remote intake-server is configured but not running #53

Open dylanmcreynolds opened 4 years ago

dylanmcreynolds commented 4 years ago

If you configure Xi-Cam to use an intake-server as a source, and the server is cannot be reached, xi-cam crashes.

To configure, do something like this in an intake catalog yml:

    noether_intake_server:
        driver: intake_remote
        args:
            url: intake://noether.dhcp.lbl.gov:5000
Traceback (most recent call last):
  File "/home/dylan/work/xicam/Xi-cam.gui/xicam/gui/widgets/dataresourcebrowser.py", line 161, in _addBrowser
    plugin = plugin.plugin_object()
  File "/home/dylan/work/xicam/Xi-cam.gui/xicam/gui/bluesky/databroker_catalog_plugin.py", line 89, in __new__
    catalog.controller = SearchingCatalogController(catalog)
  File "/home/dylan/work/xicam/Xi-cam.gui/xicam/gui/bluesky/databroker_catalog_plugin.py", line 47, in __init__
    self.centralWidget = CentralWidget(menuBar=None, catalog=root_catalog)
  File "/home/dylan/work/xicam/Xi-cam.gui/xicam/gui/bluesky/central.py", line 30, in __init__
    catalog=catalog)
  File "/home/dylan/work/xicam/Xi-cam.gui/xicam/gui/bluesky/search.py", line 80, in __init__
    self.root_catalog = self.flatten_remote_catalogs(catalog)
  File "/home/dylan/work/xicam/Xi-cam.gui/xicam/gui/bluesky/search.py", line 145, in flatten_remote_catalogs
    if isinstance(sub_cat(), RemoteCatalog):
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/intake/catalog/entry.py", line 78, in __call__
    s = self.get(**kwargs)
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/intake/catalog/local.py", line 283, in get
    data_source = plugin(**open_args)
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/intake/catalog/base.py", line 565, in __init__
    getshell=getshell, storage_options=storage_options)
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/intake/catalog/base.py", line 113, in __init__
    self.force_reload()
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/intake/catalog/base.py", line 172, in force_reload
    self._load()
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/intake/catalog/base.py", line 690, in _load
    response = requests.get(self.info_url, **http_args)
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/home/dylan/work/xicam/env/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='noether.dhcp.lbl.gov', port=5000): Max retries exceeded with url: /v1/info (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f2cc7917d30>: Failed to establish a new connection: [Errno 111] Connection refused'))
Backend Qt5Agg is interactive backend. Turning interactive mode on.