PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

It can not auto-detect but let you customize all parameters when add custom environment which install from Microsoft Store.

Open linette-zyy opened this issue 3 years ago • 1 comments

Describe the bug Build of Visual Studio: 17.1.0 Preview 1.0 [31818.287.main] Build of Python Package: 17.0.21274.2 OS version: Windows 10 Enterprise 20H2 Python 3.9 install from Microsoft Store

Steps to Reproduce

  1. Create a new python application
  2. Right click Python Environment -> Add environment -> Existing environment
  3. Dropdown the Environment list and choose Custom image
  4. Browse the Python3.9 folder which is install from Microsoft Store and choose the folder
  5. Check the Description

Expected behavior All parameters should be auto filled.

Actual result It cannot detected the language version and Architecture image

linette-zyy avatar Oct 19 '21 07:10 linette-zyy

[Window Title] devenv.exe

[Main Instruction] An unexpected error occurred

[Content] Please press Ctrl+C to copy the contents of this dialog and report this error to our issue tracker.

[V] Show details [Close]

[Expanded Information]

Build: 17.0.21293.2

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\WINDOWS\Lib'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.EnumerateDirectories(String path, String searchPattern, SearchOption searchOption)
   at Microsoft.PythonTools.Interpreter.PackageManagerFactoryExtensions.<GetModulesInLib>d__1.MoveNext()
   at Microsoft.PythonTools.Interpreter.PackageManagerFactoryExtensions.<>c__DisplayClass0_0.<HasModuleAsync>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.Interpreter.PackageManagerFactoryExtensions.<HasModuleAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.Environments.AddVirtualEnvironmentView.<UpdateInterpreterAsync>d__107.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.Infrastructure.VSTaskExtensions.<HandleAllExceptions>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

This is what I get as error when I try to select existcing virtual environment for my project

vsadhav02 avatar Nov 17 '21 13:11 vsadhav02

Closing because this is not a supported scenario

AdamYoblick avatar Jan 26 '23 22:01 AdamYoblick

@vsadhav02 If this is still an issue for you, please open a new issue so we can investigate. Thanks!

AdamYoblick avatar Jan 26 '23 22:01 AdamYoblick