Seit einer Weile keine python manage.py
Befehl, der eine Eingabe erfordert (Entfernen von Null = True ohne Vorgabe, statische Dateien erneut zu erfassen ...) akzeptiert diese Eingabe nicht. Wenn ich die Eingabetaste drücke, wird einfach der Wagenrücklaufzeichen ^M
in der Konsole angezeigt. Ich habe keine Ahnung, wie dies zu debuggen, wie ctrl+ c
einfach Tracebacks wie diese gibt:Django manage.py Befehle, die Eingabe erfordern stecken stecken
./manage.py makemigrations
You are trying to change the nullable field 'package' on company to non-nullable without a default; we cannot do that (the database needs something to populate existing rows).
Please select a fix:
1) Provide a one-off default now (will be set on all existing rows with a null value for this column)
2) Ignore for now, and let me handle existing rows with NULL myself (e.g. because you added a RunPython or RunSQL operation to handle NULL values in a previous data migration)
3) Quit, and let me add a default in models.py
Select an option: 1^M^M^M^C^CKeyboardInterrupt
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/Users/mac/.virtualenvs/mindance/lib/python3.6/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/Users/mac/.virtualenvs/mindance/lib/python3.6/site-packages/django/core/management/__init__.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/mac/.virtualenvs/mindance/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/mac/.virtualenvs/mindance/lib/python3.6/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/Users/mac/.virtualenvs/mindance/lib/python3.6/site-packages/django/core/management/commands/makemigrations.py", line 177, in handle
migration_name=self.migration_name,
File "/Users/mac/.virtualenvs/mindance/lib/python3.6/site-packages/django/db/migrations/autodetector.py", line 47, in changes
changes = self._detect_changes(convert_apps, graph)
File "/Users/mac/.virtualenvs/mindance/lib/python3.6/site-packages/django/db/migrations/autodetector.py", line 189, in _detect_changes
self.generate_altered_fields()
File "/Users/mac/.virtualenvs/mindance/lib/python3.6/site-packages/django/db/migrations/autodetector.py", line 920, in generate_altered_fields
new_default = self.questioner.ask_not_null_alteration(field_name, model_name)
File "/Users/mac/.virtualenvs/mindance/lib/python3.6/site-packages/django/db/migrations/questioner.py", line 182, in ask_not_null_alteration
"Quit, and let me add a default in models.py",
File "/Users/mac/.virtualenvs/mindance/lib/python3.6/site-packages/django/db/migrations/questioner.py", line 99, in _choice_input
result = input("Select an option: ")
SystemError: <built-in function input> returned a result with an error set
Irgendwelche Hinweise, wie dieses Problem zu nähern? Ich habe meinen virtualenv neu installiert. Vielleicht sollte ich Python neu installieren?
Versionen: Python 3.6.1 Django == 1.11.2
ich neu installiert Python bereits und fest laufen Das Thema. Irgendeine Idee, was das verursacht haben könnte? –