Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alexcwsmith opened this issue Mar 22, 2024 · 1 comment

Comments

@alexcwsmith
Copy link

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!

@BROBAR14
Copy link

Hi Alex!

I have recently begun trying to use this protocol and I am currently receiving the same error you did. I tried editing the code to circumvent the issue, however I then received the same message for a different keyword argument ('background').

I realise you never received an answer on here but I was wondering if perhaps you have managed to solve this issue and would be willing to share the solution with me.

Thank you so much,
Barbara

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants