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

prompt() got an unexpected keyword argument 'inputhook' #488

Open
ClownJay opened this issue Sep 5, 2024 · 2 comments
Open

prompt() got an unexpected keyword argument 'inputhook' #488

ClownJay opened this issue Sep 5, 2024 · 2 comments

Comments

@ClownJay
Copy link

ClownJay commented Sep 5, 2024

I got an error message when launch radian on linux system.

❯ radian
unexpected error was caught.
please report to https://github.com/randy3k/radian for such error.
prompt() got an unexpected keyword argument 'inputhook'
Traceback (most recent call last):
  File "/xxxx/xxxx/xxxx//micromamba/envs/R/lib/python3.9/site-packages/radian/console.py", line 99, in _read_console
    text = session.prompt(add_history=add_history)
  File "/xxxx/xxxx/xxxx/micromamba/envs/R/lib/python3.9/site-packages/radian/prompt_session.py", line 71, in prompt
    text = super().prompt(*args, **kwargs)
  File "/xxxx/xxxx/xxxx/micromamba/envs/R/lib/python3.9/site-packages/radian/lineedit/prompt.py", line 228, in prompt
    result = super().prompt(inputhook=self._inputhook, **kwargs)
TypeError: prompt() got an unexpected keyword argument 'inputhook'

I had reinstalled the radian and prompt_toolkit, but it did not work.
The version information is as following

❯ radian --version
radian version: 0.6.13
r executable: /xxxx/xxxx/xxxx/micromamba/envs/R/lib/R/bin/R
r version: 4.3.3
python executable: /xxxx/xxxx/xxxx/micromamba/envs/R/bin/python3.9
python version: 3.9.18

❯ mamba list | grep prompt
  prompt-toolkit                        3.0.43        py39h06a4308_0       anaconda/pkgs/main
  prompt_toolkit                        3.0.43        hd3eb1b0_0           anaconda/pkgs/main

Thanks for your help.

@randy3k
Copy link
Owner

randy3k commented Sep 6, 2024

We require prompt-toolkit 3.0.41
due to recent refactoring of prompt-toolkit.

If you have 3.0.43, it should support the argument inputhook.

I don't have much experience with mamba to recommend you anything, though you are right that it is caused by an outdated version of prompt-toolkit.

@ClownJay
Copy link
Author

ClownJay commented Sep 6, 2024

We require prompt-toolkit 3.0.41 due to recent refactoring of prompt-toolkit.

If you have 3.0.43, it should support the argument inputhook.

I don't have much experience with mamba to recommend you anything, though you are right that it is caused by an outdated version of prompt-toolkit.

Thanks for your prompt reply.
I have tried to rollback version as followings:

❯ radian --version
radian version: 0.6.9
r executable: /xxxx/xxxx/xxxx/micromamba/envs/R/lib/R/bin/R
r version: 4.3.3
python executable: /xxxx/xxxx/xxxx/micromamba/envs/R/bin/python3.9
python version: 3.9.18
❯ mamba list | grep prompt
  prompt-toolkit                        3.0.41        pyha770c72_0         anaconda/cloud/conda-forge
  prompt_toolkit                        3.0.41        hd8ed1ab_0           anaconda/cloud/conda-forge

but it did not work either.

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

3 participants
@randy3k @ClownJay and others