PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

An error pops up when run "Django Check, Django Migrate, Django Create Superuser...".

Open ttSpace opened this issue 3 years ago • 11 comments

Describe the bug

image

Steps to Reproduce

  1. Create a Django Web Project.
  2. In solution explorer, right click on project and select:
  • Python, make migrations >= 1.7
  • Python, migrate >= 1.7
  • Python, Django Create Superuser >= 1.7
  • Python, collect static files
  • Python, Django check >= 1.7

Additional context and screenshots

image

image

ttSpace avatar Oct 08 '21 07:10 ttSpace

I have a different error when trying to create a new django web project:

image

This is because C:\Users\advolker\AppData\Local\Microsoft\VisualStudio\17.0_51669e98Exp\Extensions\Microsoft Corporation\Python - Django\16.0.0 does not exist. The path should end with 17.0.0.

This sounds like an error in our build scripts.

AdamYoblick avatar Oct 08 '21 23:10 AdamYoblick

It doesn't repro for me on VS 2022 Preview 6 anymore. Strictly following the repro steps (i.e. without creating the environment and installing Django) opens the Django Management Console tool window correctly, with the following error in it: image And if I configure a virtualenv first and install Django in it before "Django Create Superuser" etc, then it works as expected.

@ttSpace, can you please verify?

int19h avatar Oct 26 '21 00:10 int19h

@int19h Hi, (without creating the env and installing Django) I got this.

image

(Create an env and install Django) I can Create Superuser, but I got nothing when I run the other commands, is that supposed to happen? Build of Visual Studio: 17.0.0 RC3 [31825.309.d17.0]

image

ttSpace avatar Oct 27 '21 01:10 ttSpace

It's supposed to print out some stuff. You can see what, exactly, by doing it manually yourself in the terminal - go to the folder where the project is, and do e.g.:

.\env\Scripts\python.exe manage.py check

int19h avatar Oct 27 '21 18:10 int19h

@int19h I can repro in today's build. (without creating the env and installing Django) The function is not always good. Build of Visual Studio: 17.1.0 Preview 1.0 [31827.299.main]

image

BTW, (Create an env and install Django) When I run the command in the console, there is a result the first time but there is no result later. It's not the first time running "Django Create Superuser" has been hanging, but there is no result.

image

ttSpace avatar Oct 28 '21 06:10 ttSpace

In today's build, Even if I create the environment and install Django, It can be reproduced. Build of Visual Studio: 17.0.0 [31829.266.d17.0] Build of Python Package: 17.0.21293.2

ttSpace avatar Nov 01 '21 07:11 ttSpace

This issue also reproduced on 17.1 preview1. image

image

linette-zyy avatar Nov 04 '21 02:11 linette-zyy

In toady's build 17.1.0 Preview 3.0 [32029.61.main] , I can repro this.

image

ttSpace avatar Dec 30 '21 09:12 ttSpace

On this environment image When click Python, make migrations >= 1.7 or Python, migrate >= 1.7 No response on the output window image And the Superuser can be created successfully and can log in.

linette-zyy avatar Apr 15 '22 08:04 linette-zyy

In today's build 17.6.0 Preview 1.0 [33329.2.main], Python Package: 17.0.23005.2, After clicking Django Create Superuser/Django check etc. The Django Management Console does not respond.

image

ttSpace avatar Jan 30 '23 06:01 ttSpace

On today's build image The error still pops up. image

linette-zyy avatar Jan 09 '24 06:01 linette-zyy