While pycharm occured "python 3.5 dose not support variable annotations" while my python version is 3.7.6? - annotations

I have never installed python 3.5.The OS is windows,and I choose the right interpreter(python 3.7.6) in settings.
However ,the program can execute successfully.

Please check the code compatibility inspection settings: File - Settings - Editor - Inspections - Python - Code Compatibility inspection

Related

visual studio code - couldn't start client language support for java

Visual Studio code was working fine with maven projects, and suddenly stopped after I installed a new extension (Lombok).
I can't seem to get it to work anymore, even if I'm not using Lombok, and have the plugin disabled.
As soon as I start Visual Studio Code, it complains with
Couldn't start client language support for java
How can I fix this?
To solve this, I did the following:
Went to the installed extension (Command Pallette, Extensions: Installed Extensions)
found "Language suppoort for Java(TM) by Red Hat"
Clicked on the drop down arrow by "Uninstall", and chose "Install another version"
Chose a recent version, and restarted Visual Studio Code
it worked - I assume I could upgrade to latest again, but haven't done so yet.
Note: I feel that somehow I broke my settings.json file, and doing this fixed it up.

OmniSharp server is not running macOS 10.13.6

OmniSharp server is not running on my VS code. I tried with reinstall both VS code and C# extension powered by omniSharp, but it is still not running. I am working in a macOS 10.13.6.
So I do not get any error (red highlighting in case inaccurate code ) or in my code. Any advise how to solve this?
Reinstalling of an older version of C# extension solved my problem. Now OmniSharp is functioning fine.
I changed "omnisharp.useGlobalMono": "always" to "omnisharp.useGlobalMono": "never" in settings.json file and now it's working for me.
You can open the "settings.json" file from ctrl+p and type "settings.json" to opened window.
You can follow these steps:
Go to the VSCode settings (File > Preferences > Settings).
Search with the keywords omnisharp use global mono to locate the configuration.
Change the value to never from either auto or always.
REMEMBER to restart the VSCode to activate the change (I restarted it twice to be sure).

VS Code - pylint is not running

I have a workspace setup in VS Code where I do python development. I have linting enabled, pylint enabled as the provider, and lint on save enabled, but I continue to see no errors in the Problems panel. When I run pylint via the command line in the virtual environment i see a bunch of issues - so I know pylint works. I am also using black formatting(on save) which works without issue. I have tried using both the default pylint path as well as updating it manually to the exact location and still no results. When I look at the Output panel for python it looks like pylint is never even running (i.e. I see the commands for black running there but nothing for pylint).
My pylint version is 2.4.4 and VS Code version 1.46
Any idea how to get this working?
This is due to a bug in the newer version of python extension see here.
For now you can either wait for the fix to arrive, use jedi language server or install previous version of the extension
Add
"python.linting.enabled" : true
"python.linting.lintOnSave" : true
to your settings.json
Uninstall Python Extension
Reinstall Python Extension
And with that there will will be one more extension of "Python Extension" named - "PYLANCE" don't forget to install that too.
Reload VS Code
DONE !!

VSCode with Python Extension April 2019 - "Python Extension Loading..."

I am unable to get Python extension working with fresh install of VS Code / Python 3.7.3 on Windows 10.
VS Code status bar shows a message 'Python extension loading...' continuously.
Python is installed in a non-standard path at c:\Programs\Python\Python37-32\python
Have uninstalled both VSCode and python several times and had installed afresh.
C:\WINDOWS\system32>which python
/c/Programs/Python/Python37-32/python
When developer tools is opened, the following error shows up in console.
property 'length' of undefined
at g.update (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:373818)
at g.initialize (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:381134)
at new g (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:372522)
at Function.getInstance (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:372729)
at h.getSettings (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:370264)
at b.initialize (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:83:624877)
at c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:9:93210
at c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:9:93877
at module.exports.t.activate (c:\Users\APCIT\.vscode\extensions\ms-python.python-2019.4.11987\out\client\extension.js:9:96601)
at Function._callActivateOptional (c:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:719:166)
at Function._callActivate (c:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:718:872)
at define._doActivateExtension.Promise.all.then.e (c:\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:718:79)
(Posted solution on behalf of the question author).
OK - I deleted the VS Code profile folder
'%APPDATA%\Roaming\Code
and installed fresh extension along with miniconda, and it is working fine.
This seems to be an annoying problem that is caused by other extensions. Best way I fixed mine was:
To disable all the extensions
Enable ms-python extension
Reload vs-code and voila, it's all fixed
I also had this problem. But I fixed it by changing the location of the python file.

Unable to run .robot files in Eclipse Oxygen in Mac

I have a Mac laptop and have installed RED in Eclipse Oxygen version. When I try to run a .robot file in Eclipse I see the popup RunTime Environment Error with the message "Unable to provide valid RED environment. Check python/ robot installation and set it in Preferences". I do not see this issue in Windows machine.
This errors tells that RED could not found Python+Robot installation using command which/whereis. This can be verified by going to Windows->Preferences->RobotFramework -> Installed Frameworks. That part should show you list of python interpreters with robot - in your case either could be empty (no python found) or entry with red color (python without robot found).
On Windows usually Python is added to PATH so it is visible and discovered by RED, somehow Mac does not do this by default (you are not the first person with such issue).
Go to Windows->Preferences->RobotFramework -> Installed Frameworks, there is Add.. button and provide path where python executable is located. I do not have MacOS to provide you usual path, under linux (Centos,Ubuntu) it is in /usr/bin . Take note that RED looks for python filename, if your installation renamed it to python3,python2,py2,py3 or other just make a copy to python.
I will make an Help topic about finding python installations when python is not in PATH as it seems it is more common than I fought.
If you have any other questions, it is better to create GitHub issue: https://github.com/nokia/RED/issues