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

turtle module can't be corrected checked #1056

Closed
yrpang opened this Issue Mar 13, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@yrpang

yrpang commented Mar 13, 2018

Environment data

  • VS Code version: < 1.21.0(1.21.0) >
  • Extension version : < 2018.2.1 >
  • OS and version: < MacOS 10.13.3 >
  • Python version: < 3.6.1; none>
  • Type of virtual environment used (if applicable): < N/A >
  • Relevant/affected Python packages and their versions: < python 3.6.1 >

Actual behavior

< When I use turtle module in my code it can't be correctly checked by the python extension.
It loos like the pictures below...
2018-03-13 11 08 15
2018-03-13 11 08 24

Expected behavior

< Maybe the extension should support turtle...... >

Steps to reproduce:

  1. open a file
  2. use turtle module
  3. it happend

Logs

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

##########Linting Output - pylint##########
No config file found, using default configuration
##########Linting Output - pylint##########
No config file found, using default configuration
************* Module DrawPython
2,0,error,E1101:Module 'turtle' has no 'setup' member
3,0,error,E1101:Module 'turtle' has no 'penup' member
4,0,error,E1101:Module 'turtle' has no 'fd' member
5,0,error,E1101:Module 'turtle' has no 'pendown' member
6,0,error,E1101:Module 'turtle' has no 'pensize' member

----------------------------------------------------------------------
Your code has been rated at -31.67/10 (previous run: -31.67/10, +0.00)

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

workbench.main.js:sourcemap:2842 [/Users/pangyiren/.vscode/extensions/ms-vscode.cpptools-0.15.0]: 命令“workbench.action.gotoSymbol”在 "commands" 部分重复出现。
workbench.main.js:sourcemap:2842 [/Users/pangyiren/.vscode/extensions/ms-vscode.cpptools-0.15.0]: 命令“workbench.action.showAllSymbols”在 "commands" 部分重复出现。
workbench.main.js:sourcemap:2844 [ms-python.python]Cannot read property 'document' of undefined
e.$onExtensionRuntimeError @ workbench.main.js:sourcemap:2844
workbench.main.js:sourcemap:2844 TypeError: Cannot read property 'document' of undefined
	at disposables.push.documentManager.onDidChangeActiveTextEditor (/Users/pangyiren/.vscode/extensions/ms-python.python-2018.2.1/out/client/interpreter/interpreterService.js:54:91)
	at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:88:992)
	at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:665:650
	at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:88:992)
	at e.$acceptDocumentsAndEditorsDelta (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:663:757)
	at e._doInvokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:587:832)
	at e._invokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:587:550)
	at e._receiveRequest (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:586:658)
	at e._receiveOneMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:586:427)
	at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:585:494
e.$onExtensionRuntimeError @ workbench.main.js:sourcemap:2844
workbench.main.js:sourcemap:257 [Extension Host] (node:11803) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ workbench.main.js:sourcemap:257```
@DonJayamanne

This comment has been minimized.

DonJayamanne commented Mar 13, 2018

  • Please ensure you have turtle installed in your python environment
  • Please ensure you have selected the Python environment correctly (check .vscode/settings.json, ensure pyton.pythonPath points to the correct interpreter`
  • Please run the pylint linter manually from command line pylint DrawPython.py, if you get the same errors, then its a problem with Pylint, and I'd suggest you create an issue on their repo
  • Finally, you're free to choose another linter, such as flake8 or the like (see here https://code.visualstudio.com/docs/python/linting)
@yrpang

This comment has been minimized.

yrpang commented Mar 13, 2018

Really thank you for your answer.
I have changed linter to flak8 and it worked.

@yrpang yrpang closed this Mar 13, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Jul 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.