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

Importing 'pathlib' in a script disabled autocompletion #4

Open
brechtm opened this issue Jun 21, 2021 · 2 comments
Open

Importing 'pathlib' in a script disabled autocompletion #4

brechtm opened this issue Jun 21, 2021 · 2 comments
Labels
good first issue Good for newcomers

Comments

@brechtm
Copy link

brechtm commented Jun 21, 2021

For some reason xontrib-argcomplete wasn't working for my script. I've finally been able to identify that importing pathlib in my script somehow prevents tab completion from working! I have not yet investigated what the root cause is for this, however.

@anki-code
Copy link
Owner

hi! Could you please add the minimal example to repeat the issue?

@brechtm
Copy link
Author

brechtm commented Jun 23, 2021

To reproduce this, just add "import pathlib" to one of the proto scripts in the xontrib-argcomplete/tests directory. But do note that the issue seems to depend on the version of Python (3.69) and/or argcomplete (1.8.1). I couldn't reproduce this on Python 3.9.5 with argcomplete 1.12.3. Is there a check that the argcomplete versions used by the script and the one by xontrib-argcomplete are compatible?

Running my script (proprietary, can't share) on Python 3.9.2 with argcomplete 1.12.3, completion suggestions are shown, but they include the help string shown after the arguments as well as other text output by <script> --help. But now, on another attempt in a fresh shell, again I don't get any completion suggestions.

Unfortunately, this is proving very difficult to debug and I can't spend more time on this...

@anki-code anki-code added the good first issue Good for newcomers label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants