PyCharm manage.py runningerver error

Sorry to ask a question about noob, but I have no idea why this is happening.

I just reinstalled Django 1.3 and for the first time trying to use PyCharm. When I run python manage.py runserver from Terminal, everything goes without a hitch, however, if I try runserver from PyCharm, I get the following:

 Importing Django settings module settings Traceback (most recent call last): Validating models... 0 errors found Django version 1.3, using settings 'glist.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. File "/Applications/PyCharm 1.2.1.app/helpers/pycharm/django_manage.py", line 19, in <module> run_module(manage_file, None, '__main__') File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 180, in run_module fname, loader, pkg_name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Users/goon/code/glist/manage.py", line 14, in <module> execute_manager(settings) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute output = self.handle(*args, **options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 67, in handle self.run(*args, **options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 76, in run autoreload.main(self.inner_run, args, options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/autoreload.py", line 131, in main reloader(main_func, args, kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/autoreload.py", line 104, in python_reloader reloader_thread() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/autoreload.py", line 83, in reloader_thread ensure_echo_on() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/autoreload.py", line 77, in ensure_echo_on attr_list = termios.tcgetattr(fd) termios.error: (25, 'Inappropriate ioctl for device') Process finished with exit code 1 

Please note that all this happens before I request any page from the browser. And, as I said, I have no problems with the Terminal. Any help would be greatly appreciated.

+6
source share
2 answers

What version for pycharm are you using? This is actually a bug in django 1.3. This will happen if you try to start django from any mode in reboot mode. It can be fixed by django fix. Although PyCharm automatically switches to reboot mode.

Read this: http://blogs.jetbrains.com/pycharm/2011/03/pycharm-1-2-1-release-candidate-py-test-2-0-buildout-1-5/

+11
source

Apply Patch. His bug is Django 1.3.1. This worked for me on pYCharm 3.4.1

https://github.com/django/django/commit/3e7ce3c750

0
source

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


All Articles