vscode运行python项目报错
huangweihia opened this issue · 2 comments
huangweihia commented
https://github.com/Microsoft/vscode-python/issues/newTraceback (most recent call last):
File "c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\ptvsd_launcher.py", line 21, in <module>
import ptvsd
File "c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\lib\python\old_ptvsd\ptvsd\__init__.py", line 13, in <module>
from ._vendored import force_pydevd
File "c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\force_pydevd.py", line 18, in <module>
pydevd_constants = import_module('_pydevd_bundle.pydevd_constants')
File "D:\python\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_constants.py", line 205, in <module>
from _pydev_imps._pydev_saved_modules import thread
File "c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydev_imps\_pydev_saved_modules.py", line 21, in <module>
import xmlrpc.client as xmlrpclib
ModuleNotFoundError: No module named 'xmlrpc'
Internal error detected. Please copy the above traceback and report at
https://github.com/Microsoft/vscode-python/issues/new
Press Enter to close. . .
d:\ppython>cd d:\ppython && cmd /C "set "ALLUSERSPROFILE=C:\ProgramData" && set "AMD_ENTRYPOINT=vs/workbench/services/extensions/node/extensionHostProcess" && set "APPDATA=C:\Users\admin\AppData\Roaming" && set "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL=true" && set "CommonProgramFiles=C:\Program Files\Common Files" && set "CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files" && set "CommonProgramW6432=C:\Program Files\Common Files" && set "COMPUTERNAME=DESKTOP-JIG7I1L" && set "ComSpec=C:\WINDOWS\system32\cmd.exe" && set "DriverData=C:\Windows\System32\Drivers\DriverData" && set "ELECTRON_RUN_AS_NODE=1" && set "FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer" && set "FPS_BROWSER_USER_PROFILE_STRING=Default" && set "GOROOT=C:\Go\" && set "HOMEDRIVE=C:" && set "HOMEPATH=\Users\admin" && set "LOCALAPPDATA=C:\Users\admin\AppData\Local" && set "LOGONSERVER=\\DESKTOP-JIG7I1L" && set "NUMBER_OF_PROCESSORS=4" && set "OneDrive=C:\Users\admin\OneDrive" && set "OS=Windows_NT" && set "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" && set "PhpStorm=C:\Users\admin\Desktop\PhpStorm 2019.2.3\bin;" && set "PIPE_LOGGING=true" && set "PROCESSOR_ARCHITECTURE=AMD64" && set "PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 9, GenuineIntel" && set "PROCESSOR_LEVEL=6" && set "PROCESSOR_REVISION=9e09" && set "ProgramData=C:\ProgramData" && set "ProgramFiles=C:\Program Files"
&& set "ProgramFiles(x86)=C:\Program Files (x86)" && set "ProgramW6432=C:\Program Files" && set "PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules" && set "PUBLIC=C:\Users\Public" && set "SESSIONNAME=Console" && set "SystemDrive=C:" && set "SystemRoot=C:\WINDOWS" && set "TEMP=C:\Users\admin\AppData\Local\Temp" && set "TMP=C:\Users\admin\AppData\Local\Temp" && set "USERDOMAIN=DESKTOP-JIG7I1L" && set "USERDOMAIN_ROAMINGPROFILE=DESKTOP-JIG7I1L" && set "USERNAME=admin" && set "USERPROFILE=C:\Users\admin" && set "VERBOSE_LOGGING=true" && set "VSCODE_CWD=D:\APP_CODE_IDE\Microsoft VS Code" && set "VSCODE_HANDLES_UNCAUGHT_ERRORS=true" && set "VSCODE_IPC_HOOK=\\.\pipe\40c024692924a7e0e09c00bf44e8c2ef-1.38.1-main-sock" && set "VSCODE_IPC_HOOK_EXTHOST=\\.\pipe\vscode-ipc-0174928a-b4bd-4afc-b8f6-67bdff614605-sock" && set "VSCODE_LOGS=C:\Users\admin\AppData\Roaming\Code\logs\20191226T194743" && set "VSCODE_LOG_STACK=false" && set "VSCODE_NLS_CONFIG={"locale":"zh-cn","availableLanguages":{"*":"zh-cn"},"_languagePackId":"454fb54f7306176d5760953f2a2878cb.zh-cn","_translationsConfigFile":"C:\\Users\\admin\\AppData\\Roaming\\Code\\clp\\454fb54f7306176d5760953f2a2878cb.zh-cn\\tcf.json","_cacheRoot":"C:\\Users\\admin\\AppData\\Roaming\\Code\\clp\\454fb54f7306176d5760953f2a2878cb.zh-cn","_resolvedLanguagePackCoreLocation":"C:\\Users\\admin\\AppData\\Roaming\\Code\\clp\\454fb54f7306176d5760953f2a2878cb.zh-cn\\b37e54c98e1a74ba89e03073e5a3761284e3ffb0","_corruptedFile":"C:\\Users\\admin\\AppData\\Roaming\\Code\\clp\\454fb54f7306176d5760953f2a2878cb.zh-cn\\corrupted.info","_languagePackSupport":true}" && set "VSCODE_NODE_CACHED_DATA_DIR=C:\Users\admin\AppData\Roaming\Code\CachedData\b37e54c98e1a74ba89e03073e5a3761284e3ffb0" && set "VSCODE_PID=7748" && set "VSCODE_PREVENT_FOREIGN_INSPECT=true" && set "windir=C:\WINDOWS" && set "Path=E:\kkk;E:\kkk\Library\mingw-w64\bin;E:\kkk\Library\usr\bin;E:\kkk\Library\bin;E:\kkk\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\TortoiseSVN\bin;C:\WINDOWS\System32\OpenSSH\;E:\node\;D:\APP_CODE_IDE\Microsoft VS Code\bin;E:\p2\PHPTutorial\php\php-7.1.13-nts\php.exe\;D:\python\;D:\python\Scripts\;D:\APP\Mozilla Firefox\firefox.exe\;C:\Program Files\Git\cmd;F:\ptty\;F:\winspc\WinSCP\;D:\python\Scripts\;D:\python\;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;D:\APP_CODE_IDE\Microsoft VS Code\bin;C:\Users\admin\AppData\Roaming\Composer\vendor\bin;E:\sphinx\bin;E:\PHPTutorial\MySQL\bin;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;C:\Users\admin\AppData\Roaming\npm;E:\p2\PHPTutorial\php\php-7.1.13-nts;C:\Users\admin\Desktop\PhpStorm 2019.2.3\bin;;" && set "PYTHONIOENCODING=UTF-8" && set
"PYTHONUNBUFFERED=1" && D:\python\python.exe c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\ptvsd_launcher.py --default --nodebug --client --host localhost --port 64720 d:\ppython\core\php_python.py "
Traceback (most recent call last):
File "c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\ptvsd_launcher.py", line 21, in <module>
import ptvsd
File "c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\lib\python\old_ptvsd\ptvsd\__init__.py", line 13, in <module>
from ._vendored import force_pydevd
File "c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\force_pydevd.py", line 18, in <module>
pydevd_constants = import_module('_pydevd_bundle.pydevd_constants')
File "D:\python\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydevd_bundle\pydevd_constants.py", line 205, in <module>
from _pydev_imps._pydev_saved_modules import thread
File "c:\Users\admin\.vscode\extensions\ms-python.python-2019.11.50794\pythonFiles\lib\python\old_ptvsd\ptvsd\_vendored\pydevd\_pydev_imps\_pydev_saved_modules.py", line 21, in <module>
import xmlrpc.client as xmlrpclib
ModuleNotFoundError: No module named 'xmlrpc'
fabioz commented
@huangweihia what Python version are you using?
From the traceback it seems to be some Python 3 variant, but in this case, it's strange that the xmlrpc
module is not found (xmlrpc
is a Python standard library module and not being able to import it hints at some corruption of the standard library in your Python install, so, I'd advise you to reinstall Python to see if it fixes your problem).
fabioz commented
Closing due to bug inactivity.