Pycharm can not open manage.py task

In one of my projects, I cannot open the management task console. It works for other projects, but not for this. It used to work, but lately it has stopped. I tried to use old versions of the project, but it is still broken. I get this error:

    Failed to get real commands on module "Visdjango": python process died with code 1: Traceback (most recent call last):
  File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.1\helpers\pycharm\manage_tasks_provider.py", line 22, in <module>
    parser.report_data(dumper)
  File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.1\helpers\pycharm\django_manage_commands_provider\_parser\parser.py", line 40, in report_data
    module_to_use.process_command(dumper, command, command.create_parser("", command_name))
  File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.1\helpers\pycharm\django_manage_commands_provider\_parser\_optparse.py", line 23, in process_command
    dumper.set_arguments(command.args)
  File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.1\helpers\pycharm\django_manage_commands_provider\_xml.py", line 95, in set_arguments
    self.__command_element.setAttribute("args", VersionAgnosticUtils().to_unicode(command_args_text))
  File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.1\helpers\pycharm\utils.py", line 36, in to_unicode
    return unicode(obj.decode("utf-8"))
AttributeError: 'list' object has no attribute 'decode'
+4
source share
3 answers

Install version 4.5.3 RC

If you are using a virtual environment, make sure that your project interpreter (settings> Project: ...> Project Interpreter) points to a python executable (e.g. my_virtual_env / bin / python3.4).

, python . Vagrant, , PyCharm Vagrant, VM, .

+1

py.harm 4.5. PyCharm.

+1

. pycharm django . :

  • , . django , . . , . your_pycharm_dir/helpers/pycharm/django_manage_command_provider/_parse/_utils.py 26 assert isinstance(opt.choices, list), "Choices should be list"
  • . - class Command(BaseCommand): args= ['app_label', 'model_name', ] . .

debug pycharm django manage.py, your_pycharm_dir/helpers/pycharm/manage_py_task_provider.py. 22 , try: dumper = _xml.XmlDumper() parser.report_data(dumper) print(dumper.xml) except Exception: pass

+1

Source: https://habr.com/ru/post/1589492/


All Articles