Skip to content

TypeError: FileSelector.__init__() got an unexpected keyword argument 'default' #17

Description

@alexcwsmith

Hi, thanks for developing this, I am excited to try it out.

I am unable to load the GUI, I've tried both Option 1 (jupyter notebook) and 2 (python script) from your Current Protocols paper, and as soon as I run the PhAT_gui_script.py I get a TypeError:

TypeError: FileSelector.init() got an unexpected keyword argument 'default'

Traceback (most recent call last):
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/bokeh/application/handlers/code_runner.py", line 229, in run
    exec(self._code, module.__dict__)
  File "/d1/software/PhAT/FiberPho_Main/PhAT_gui_script.py", line 1117, in <module>
    upload_pkl_selecta = pn.widgets.FileSelector('.', default = '.pickle', only_files = True, height = 300,
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/panel/widgets/file_selector.py", line 115, in __init__
    super().__init__(**params)
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/panel/widgets/base.py", line 191, in __init__
    super().__init__(**params)
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/panel/widgets/base.py", line 75, in __init__
    super().__init__(**params)
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/panel/reactive.py", line 556, in __init__
    super().__init__(**params)
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/panel/reactive.py", line 118, in __init__
    super().__init__(**params)
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/panel/viewable.py", line 699, in __init__
    super().__init__(**params)
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/panel/viewable.py", line 538, in __init__
    super().__init__(**params)
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/panel/viewable.py", line 301, in __init__
    super().__init__(**params)
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/param/parameterized.py", line 4151, in __init__
    refs, deps = self.param._setup_params(**params)
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/param/parameterized.py", line 1678, in override_initialization
    ret = fn(self_, *args, **kw)
  File "/home/smith/anaconda3/envs/phat/lib/python3.10/site-packages/param/parameterized.py", line 1930, in _setup_params
    raise TypeError(
TypeError: FileSelector.__init__() got an unexpected keyword argument 'default'

Do you know what the fix for this is?
Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions