## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• 11:36
petrenkonikita112263 commented #7018
• May 27 18:56

fix VS crash with bad conda env… (compare)

• May 27 18:56

• May 27 18:56
• May 27 18:56
• May 27 18:04
debonte commented #7019
• May 26 22:55
sonarcloud[bot] commented #7019
• May 26 22:52
• May 26 22:52
• May 26 22:51

fix VS crash with bad conda env… (compare)

• May 26 21:59
StellaHuang95 commented #6989
• May 26 21:52
StellaHuang95 labeled #6989
• May 26 21:52
StellaHuang95 unlabeled #6989
• May 26 20:51
bschnurr commented #7018
• May 26 20:50
bschnurr commented #7018
• May 26 20:44
petrenkonikita112263 commented #7018
• May 26 20:28
bschnurr commented #7018
• May 26 19:26
petrenkonikita112263 commented #7018
• May 26 19:24
petrenkonikita112263 commented #7018
• May 26 19:07
bschnurr commented #7018
Juan Hernandez
Hello, using vs 2017 pro, 15.6.7... I just started working with QT, but it autocomplete doesn't seem to work at all with qt. if I do app = QApplication() ; I then try app.: and get nothing. the same for window = QWidget(): window.: brings up no methods, nothing.
Also, forgot to say I'm using qt5, PyQt5
Alberto Garcia Illera
@illera88
hey there!
I've been using PTVS for a long time but I've never faced the problem I just did:
I have a fresh windows installation and installed visual studio with python support. I can create python projects but for some reason when I click on start it just does nothing. I'm just using a simple hello world and trying to hit a breakpoint in the print instruction but nothing happens
I can't see anything in the output tab. I thought it was related with the python environments but i've tried multiple and that seems not to be the problem.
Using Windows 10 x64 Visual Studio 2017 Professional
Alberto Garcia Illera
@illera88
I've installed Vs2017 preview and exactly same thing: bp does not get hit and there is no log or any info why that happened
Alberto Garcia Illera
@illera88
is there a way I can get more debug from PTVS?
found out that when I start without debugging it actually runs the code. It just seems that nothing is run if I just press F5 or click on Start
Hugues Valois
@huguesv
@illera88 One thing that is relatively new is the experimental debugger. If you look in tools/options/python/experimental, you can turn it on/off. Try both and see if that makes a difference.
Alberto Garcia Illera
@illera88
I rebooted my computer and automagically it started working
I get this with the experimental one:
warning: Debugger speedups using cython not found. Run '"C:\Python27.15-x64\python.exe" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\Python\Core\Packages\ptvsd\pydevd\setup_cython.py" build_ext --inplace' to build.
and this when actually running what it ask for:
C:\windows\system32>"C:\Python37-x64\python.exe" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\Python\Core\Packages\ptvsd\pydevd\setup_cython.py" build_ext --inplace
running build_ext
building '_pydevd_bundle.pydevd_cython' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\_pydevd_bundle
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python37-x64\include -IC:\Python37-x64\include "-IC:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tc_pydevd_bundle/pydevd_cython.c /Fobuild\temp.win-amd64-3.7\Release\_pydevd_bundle/pydevd_cython.obj
pydevd_cython.c
_pydevd_bundle/pydevd_cython.c(28837): error C2039: 'exc_type': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28838): error C2039: 'exc_value': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28839): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28846): error C2039: 'exc_type': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28847): error C2039: 'exc_value': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28848): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28849): error C2039: 'exc_type': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28850): error C2039: 'exc_value': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28851): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28896): error C2039: 'exc_type': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28897): error C2039: 'exc_value': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28898): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28899): error C2039: 'exc_type': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28900): error C2039: 'exc_value': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(28901): error C2039: 'exc_traceback': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(29032): error C2039: 'exc_type': is not a member of '_ts'
c:\python37-x64\include\pystate.h(209): note: see declaration of '_ts'
_pydevd_bundle/pydevd_cython.c(29033): error C2039: 'exc_value': is not a member of '_ts'
c:\python37-x64\include\pystate.
Steve Dower
@zooba
@illera88 I don't know what the status of 3.7 support is for pydevd right now, but it should work fine without the speedups. Once we have clarified/fixed it, we will include the speedups in a VS update.
Alberto Garcia Illera
@illera88
What version is tested for the speedups?
Thomas Thelen
@ThomasThelen
Regarding support for Mac,
Every instillation guide that I have seen says to install python support via the VS Installer. The mac installer however, does not support the option for this. Is this extension supported for Mac? I haven't any indication that is is.
Steve Dower
@zooba
@illera88 Currently only Python 3.6 IIRC, though I'm petitioning the ptvsd team to expand that. Feel free to post issues on https://github.com/Microsoft/ptvsd requesting it :)
@ThomasThelen It is not. VS for Mac is a totally different product and we would have to reimplement most of the Python support to make it work there. Currently we are focused on Visual Studio 2017 and VS Code - the latter works fine on Mac, so we suggest trying that out.
Benjamin Van Renterghem
@BenjaVR
I was reading the issues about embedding Jupyter Notebooks in Visual Studio itself, although I don't understand why this will (probably?) not happen. How I would see this: when opening a .ipynb file, start a NB server at project root (with an interpreter of choice), and render the .ipynb file. What's the catch here?
I you guys would like to have that, I want to help here (will need some guidance though!)
Steve Dower
@zooba
@BenjaVR (Sorry for the slow reply.) The catch is that we don't work on a browser, and Notebooks basically need to run in a browser. The best option we have available in Visual Studio is basically IE9, and even that is going away (the recommendation is just to open the user's default browser). So about the only thing that needs implementing here is the command to start Jupyter running, and if you've installed Anaconda then you already have this command in your Start menu. You can also easily add it to VS under Tools, External Tools.
Tomer Chachamu
@r3m0t
Is the legacy debugger ever going away? Will the new debugger support mixed mode? & will PTVS use ILanguageClient for its features?
Hugues Valois
@huguesv
@r3m0t There are currently 3 debuggers: a) old ptvsd (legacy), b) new ptvsd - based on pydevd, and c) mixed-mode
old ptvsd will go away once new ptvsd has feature parity
mixed-mode debugger is completely different implementation, is unaffected and will stay
ILanguageClient: we're still focused on improving the server part for now
Tomer Chachamu
@r3m0t
Thanks!
kiddick
@kiddick
Hi here!
I've manually downloaded linux64 build from https://pvsc.blob.core.windows.net/python-language-server/Python-Language-Server-linux-x64.0.1.18204.3.nupkg and now there is Microsoft.Python.LanguageServer executable. How could I run this to verify that this is ok for my platform? Do I need any additional dependencies or specific building steps?
I've tried just ./Microsoft.Python.LanguageServer but there is no any output
Steve Dower
@zooba
@kiddick What you're doing is unsupported, so no, it's not okay for your platform :) Follow https://aka.ms/pythonblog to see when we announce that it's ready for use outside of VS Code
scripsica
@scripsica
Hi,
I have downloaded visual studio community version and trying use python on it. I tried both version of python 2.7 and 3.6 but there is problem refreshing db. It stuck on analyzing numpy.. and its intellescence stuck on numpy only. Please guide me.
Hugues Valois
@huguesv
@Shivraj1947 there are some known "stuck" issues with intellisense db in 15.8. Please enable "Use new style IntelliSense" in tools/options/python/experimental , which doesn't use a db. FYI the db-based IntelliSense has been removed in dev16.
Tomer Chachamu
@r3m0t
Will there be a 15.10 etc? I am worried by some issues already having dev16 as a milestone
scripsica
@scripsica
My issue has been resolved and thank you so much Hugues Volois
thank u so much for ur help
David Jackson
@davidwallacejackson
I'd like to write a PR for the language server, and I have some general questions about the architecture. Is this a good place to ask them?
David Jackson
@davidwallacejackson
Since it seems like the channel's maybe not super active, I'm just gonna ask and if anybody drops by and wants to answer me, cool ;-)
It seems like the analysis engine thinks in terms of nested scopes, and that a Python class is one type of scope. It also appears that methods are function scopes with the class as a parent. So my questions are:
1. Is that basically right?
2. If so, how do instances of those classes relate to the class scope, and how do they retrieve those instance methods to use, say, as completions?
David Jackson
@davidwallacejackson

for context, I'm trying to resolve the issue I submitted here: Microsoft/python-language-server#120

and if I don't happen to catch anybody: thanks for your great work! Really happy to have these tools in VSCode.

Hugues Valois
@huguesv
@r3m0t all development is now for dev16. Only top critical issues, approved by VS, will be fixed in dev15.
Hugues Valois
@huguesv
@davidwallacejackson I would recommend asking in the issue in the language server repo. As you noticed, we don't check this chat very often and with the split of language server to its own repo, the devs that can answer your questions will likely only check over there.
That is, for language server questions.
Rahul Verma
@rv404674
hi, @davidwallacejackson , i am a newcomer and i am trying to build PTVS in ubuntu. Can you tell me, is there a way to download visual studio 2017 preview for ubuntu.
Hugues Valois
@huguesv
@rv404674 VS 2017 is only available for Windows. For Ubuntu, there's Visual Studio Code (https://code.visualstudio.com/) which has its own Python extension (https://github.com/Microsoft/vscode-python)
Twiddly
@twiddli
Hello, ever since updating to VS 15.9, I now always get this window when hitting a BP.
Using Python 3.6 virtualenv, I'm not using the legacy debugger if that says something.
Twiddly
@twiddli
I set EnableNativeCodeDebugging to True in the project file, added the symbol files for my python interpreter in Options and it now seems to work again.
Twiddly
@twiddli

Okay so the fix above wasn't really a solution since it worsened the debugging perfomance by a lot. I've isolated the issue to this line of code:

gevent.monkey.patch_all(thread=False, socket=False)

using gevent==1.3.7

The legacy debugger doesn't have this issue by the way.
Dave Hirschfeld
@dhirschfeld
It seems ptvsd isn't available via conda?
Would anyone/microsoft have a problem with me putting the package up on conda-forge?
conda-forge packages just repackage the released pip package
Tomer Chachamu
@r3m0t
Hi I've set Experimental=true and the package id correctly, but VS2017 is still loading the pkgdef and some assemblies from built in PTVS, how to debug/fix?
Dave Hirschfeld
@dhirschfeld
staged-recipes PR is over @ conda-forge/staged-recipes#7112