question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strange autocomplete bugs on Ubuntu, depending on space before variable

See original GitHub issue

Problem Description

This is a strange behavior that I only experience under Ubuntu: Autocompletion very often doesn’t work if I do not have a space between the function and the next variable i put into it “function(var1.<NoTabCompletionHere>” . Sometimes it seems as this is also the case for variables that follow a comma e.g. “var1,var2.<NoTabCompletionHere” Also from time to time it seems as if the home key is broken in a sense that it doesn’t jump before the 1st but before the 2nd character. This could be something else or these two bugs could be related… I’ve encountered this behavior now on different machines, and different anaconda setups independently.

What steps will reproduce the problem?

The following doesn’t bring up the tab completion on Ubuntu, but it works without any problem on Windows.

import numpy as np
a = np.array([1,2,3])
np.exp(a.<NoTabCompletionHere>

Btw. adding an extra space before the variable name will show up the tab completion correctly:

import numpy as np
a = np.array([1,2,3])
np.exp(<Space>a.<TabCompletionWorksAgain>

Version and main components

  • Spyder Version: 3.2.6 (it seems to be a bug that exists for many months & versions by now.)
  • Python Version: 3.5.4
  • Qt Versions: 5.6.2, PyQt5 5.6 on Linux

Dependencies

pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.21.1 (OK)
numpy >=1.7      :  1.14.1 (OK)
sphinx >=0.6.6   :  1.7.1 (OK)
rope >=0.9.4     :  0.10.7 (OK)
jedi >=0.9.0     :  0.11.1 (OK)
psutil >=0.3     :  5.4.3 (OK)
nbconvert >=4.0  :  5.3.1 (OK)
sympy >=0.7.3    :  1.1.1 (OK)
cython >=0.21    :  None (NOK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.2.1 (OK)
pylint >=0.25    :  1.8.2 (OK)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
hofingermarkuscommented, Mar 22, 2018

Ok, luckily I already have various anaconda environments (Ubuntu 16.04) and updating spyder is fast… I did my tests in spyders IPython Console (not the editor) and always get the same error. No space => not Tabcompletion without space no tab completion Extra space => Tabcompletion works with space tabcompletion

Tested and reproduced with: Spyder 3.2.6 Python 3.5.4 Spyder 3.2.7 Python 3.5.4 Spyder 3.2.7 Python 3.6.4 Qt 5.6.2 PyQt5 5.6 Ipython 6.2.1 Spyder 3.2.6 Python 3.6.4 Qt 5.6.2 PyQt5 5.6 Ipython 6.2.1

I also tried it directly in the iPython console without spyder => there it works: image

1reaction
ccordoba12commented, Mar 10, 2018

Thanks Cheryl! Let us know if/when you find a reproducible use case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange autocompletion behavior - command line - Ask Ubuntu
Short answer : don't do that. As the case for spaces, better avoid filenames with special meaning or special chars in them. Long...
Read more >
How to fix Linux filename tab autocomplete that is appending ...
For some strange reason my filename autocomplete is behaving differently than normal. Given the following file structure .
Read more >
Bash 4.4 fails autocomplete environment variable for "more ...
I am working on a server that runs Ubuntu 18 and bash 4.4, and I have problem with autocompletion and expanding paths stored...
Read more >
Issue 19491: Chromium uses wrong environment variable to ...
any, are implementation-dependent. LC_MESSAGES This variable determines the locale category for processing affirmative and negative responses and the language ...
Read more >
Bash ls auto-completion of variables adds additional white ...
19 in a gnome-terminal 3.28.2 on ubuntu 18.04. I have had issues with tab-completions of directory variables in the console, which seemingly ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found