Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

FileSelector requires at least one file matching the path glob to exist #40

Open
ceball opened this issue Jan 29, 2018 · 0 comments
Open

Comments

@ceball
Copy link
Member

ceball commented Jan 29, 2018

import param, parambokeh

class Example(param.Parameterized):
    single_file = param.FileSelector(path='*.xyz',precedence=0.5)

parambokeh.Widgets(Example)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-37-8b2a7dc851db> in <module>()
----> 1 parambokeh.Widgets(Example)

~/x/y/param/parameterized.py in __new__(class_, *args, **params)
   1886         inst = class_.instance()
   1887         inst._set_name(class_.__name__)
-> 1888         return inst.__call__(*args,**params)
   1889 
   1890     def __call__(self,*args,**kw):

~/x/y/parambokeh3/parambokeh/__init__.py in __call__(self, parameterized, doc, plots, **params)
    133         self.shown = False
    134 
--> 135         widgets, views = self.widgets()
    136         plots = views + plots
    137         container = widgetbox(widgets, width=self.p.width)

~/x/y/parambokeh3/parambokeh/__init__.py in widgets(self)
    372 
    373         if self.p.show_labels:
--> 374             widgets += [self.widget(pname) for pname in ordered_params]
    375         else:
    376             widgets += [self.widget(pname) for pname in ordered_params]

~/x/y/parambokeh3/parambokeh/__init__.py in <listcomp>(.0)
    372 
    373         if self.p.show_labels:
--> 374             widgets += [self.widget(pname) for pname in ordered_params]
    375         else:
    376             widgets += [self.widget(pname) for pname in ordered_params]

~/x/y/parambokeh3/parambokeh/__init__.py in widget(self, param_name)
    336         """Get widget for param_name"""
    337         if param_name not in self._widgets:
--> 338             self._widgets[param_name] = self._make_widget(param_name)
    339         return self._widgets[param_name]
    340 

~/x/y/parambokeh3/parambokeh/__init__.py in _make_widget(self, p_name)
    272                 kw['value'] = [lookup[v] for v in value]
    273             else:
--> 274                 kw['value'] = lookup[value]
    275             opt_lookup = {k: v for k, v in options}
    276             self._widget_options[p_name] = opt_lookup
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant