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

Python tooltip strange behaviour #1924

Closed
Thalos12 opened this issue Jun 9, 2018 · 5 comments
Closed

Python tooltip strange behaviour #1924

Thalos12 opened this issue Jun 9, 2018 · 5 comments
Labels
area-editor-* User-facing catch-all area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug

Comments

@Thalos12
Copy link

Thalos12 commented Jun 9, 2018

Environment data

  • VS Code version: 1.24.0
  • Extension version (available under the Extensions sidebar): 2018.5.0
  • OS and version: Ubuntu 16.04
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.5 from Anaconda
  • Type of virtual environment used: conda (base)
  • Relevant/affected Python packages and their versions: None

Actual behavior

Sometimes when i am writing the arguments of a function the lines in the tooltip are messed up, as shown in the image below
schermata del 2018-06-09 19-01-24

Moreover, if the argument has a default value type of str, this happens
schermata del 2018-06-09 19-42-01

Expected behavior

I expect the lines in the tooltip to look like this
schermata del 2018-06-09 19-21-11

Steps to reproduce:

To reproduce the result in the first image:

  1. Create a new python file
  2. Import Pandas with import pandas as pd
  3. Try to write pd.DataFrame( and wait for the tooltip to appear
  4. Observe the strange tooltip lines.

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Starting the classic analysis engine.
##########Linting Output - pylint##########
No config file found, using default configuration

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

 INFO no standard startup: panel is active
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960 [njpwerner.autodocstring]Cannot read property 'rangeLength' of undefined
e.$onExtensionRuntimeError @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960 TypeError: Cannot read property 'rangeLength' of undefined
	at activateOnEnter (/home/ale/.vscode/extensions/njpwerner.autodocstring-0.2.1/out/src/extension.js:21:38)
	at context.subscriptions.push.vs.workspace.onDidChangeTextDocument.changeEvent (/home/ale/.vscode/extensions/njpwerner.autodocstring-0.2.1/out/src/extension.js:13:90)
	at e.fire (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:96:764)
	at e.$acceptDirtyStateChanged (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:685:973)
	at e._doInvokeHandler (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:636:832)
	at e._invokeHandler (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:636:550)
	at e._receiveRequest (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:635:631)
	at e._receiveOneMessage (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:635:400)
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:634:315
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:637:395
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:95:432
	at e.fire (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:96:764)
	at Socket.<anonymous> (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:154:338)
	at emitOne (events.js:96:13)
	at Socket.emit (events.js:191:7)
	at readableAddChunk (_stream_readable.js:178:18)
	at Socket.Readable.push (_stream_readable.js:136:10)
	at Pipe.onread (net.js:560:20)
e.$onExtensionRuntimeError @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960 [njpwerner.autodocstring]Cannot read property 'rangeLength' of undefined
e.$onExtensionRuntimeError @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960 TypeError: Cannot read property 'rangeLength' of undefined
	at activateOnEnter (/home/ale/.vscode/extensions/njpwerner.autodocstring-0.2.1/out/src/extension.js:21:38)
	at context.subscriptions.push.vs.workspace.onDidChangeTextDocument.changeEvent (/home/ale/.vscode/extensions/njpwerner.autodocstring-0.2.1/out/src/extension.js:13:90)
	at e.fire (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:96:764)
	at e.$acceptDirtyStateChanged (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:685:973)
	at e.$acceptModelSaved (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:685:723)
	at e._doInvokeHandler (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:636:832)
	at e._invokeHandler (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:636:550)
	at e._receiveRequest (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:635:631)
	at e._receiveOneMessage (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:635:400)
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:634:315
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:637:395
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:95:432
	at e.fire (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:96:764)
	at Socket.<anonymous> (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:154:338)
	at emitOne (events.js:96:13)
	at Socket.emit (events.js:191:7)
	at readableAddChunk (_stream_readable.js:178:18)
	at Socket.Readable.push (_stream_readable.js:136:10)
	at Pipe.onread (net.js:560:20)
e.$onExtensionRuntimeError @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960 [njpwerner.autodocstring]Cannot read property 'rangeLength' of undefined
e.$onExtensionRuntimeError @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960 TypeError: Cannot read property 'rangeLength' of undefined
	at activateOnEnter (/home/ale/.vscode/extensions/njpwerner.autodocstring-0.2.1/out/src/extension.js:21:38)
	at context.subscriptions.push.vs.workspace.onDidChangeTextDocument.changeEvent (/home/ale/.vscode/extensions/njpwerner.autodocstring-0.2.1/out/src/extension.js:13:90)
	at e.fire (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:96:764)
	at e.$acceptDirtyStateChanged (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:685:973)
	at e._doInvokeHandler (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:636:832)
	at e._invokeHandler (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:636:550)
	at e._receiveRequest (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:635:631)
	at e._receiveOneMessage (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:635:400)
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:634:315
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:637:395
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:95:432
	at e.fire (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:96:764)
	at Socket.<anonymous> (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:154:338)
	at emitOne (events.js:96:13)
	at Socket.emit (events.js:191:7)
	at readableAddChunk (_stream_readable.js:178:18)
	at Socket.Readable.push (_stream_readable.js:136:10)
	at Pipe.onread (net.js:560:20)
e.$onExtensionRuntimeError @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960 [njpwerner.autodocstring]Cannot read property 'rangeLength' of undefined
e.$onExtensionRuntimeError @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960 TypeError: Cannot read property 'rangeLength' of undefined
	at activateOnEnter (/home/ale/.vscode/extensions/njpwerner.autodocstring-0.2.1/out/src/extension.js:21:38)
	at context.subscriptions.push.vs.workspace.onDidChangeTextDocument.changeEvent (/home/ale/.vscode/extensions/njpwerner.autodocstring-0.2.1/out/src/extension.js:13:90)
	at e.fire (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:96:764)
	at e.$acceptDirtyStateChanged (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:685:973)
	at e.$acceptModelSaved (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:685:723)
	at e._doInvokeHandler (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:636:832)
	at e._invokeHandler (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:636:550)
	at e._receiveRequest (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:635:631)
	at e._receiveOneMessage (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:635:400)
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:634:315
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:637:395
	at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:95:432
	at e.fire (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:96:764)
	at Socket.<anonymous> (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:154:338)
	at emitOne (events.js:96:13)
	at Socket.emit (events.js:191:7)
	at readableAddChunk (_stream_readable.js:178:18)
	at Socket.Readable.push (_stream_readable.js:136:10)
	at Pipe.onread (net.js:560:20)
e.$onExtensionRuntimeError @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2960
@MikhailArkhipov
Copy link

It is vscode issue. Python documentation has embedded line breaks, but width of the tooltip is fixed so test does not always flow nicely.

See microsoft/vscode#14165

@MikhailArkhipov MikhailArkhipov added area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. upstream-vscode labels Jun 10, 2018
@Thalos12
Copy link
Author

Thanks for telling me! (and i'm sorry for posting the issue on the wrong project)
Given that the feature request is open since Oct 2016, I really hope that they will find a solution.

@patrys
Copy link

patrys commented Jun 11, 2018

@MikhailArkhipov Notice what it says under param columns=None. It doesn't look like a text wrapping issue. At least not only.

@danalf67
Copy link

danalf67 commented May 7, 2019

I have exactly the same issue in the parameter hints. I use the jedi setting because the language server is worse (all line breaks are removed after the signature). Example source code for getting the error:
import shutil
shutil.copytree()

@brettcannon brettcannon added the bug Issue identified by VS Code Team member as probable bug label Jun 3, 2019
@gramster gramster added the area-editor-* User-facing catch-all label Oct 10, 2019
@luabud
Copy link
Member

luabud commented Mar 11, 2020

Closing in favour of microsoft/vscode#14165.

@luabud luabud closed this as completed Mar 11, 2020
@ghost ghost removed the needs upstream fix label Mar 11, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-editor-* User-facing catch-all area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

7 participants