Upgraded to 2016.3 and can no longer debug django app

Completed

[MacOS 10.11.6]

Immediately after updating my version of intellij from 2016.2x to 2016.3 I was no longer able to launch my django app in the debugger.  I am consistently getting the following trace: 

Performing system checks...

System check identified no issues (0 silenced).
Traceback (most recent call last):
File "/Users/karim/Library/Application Support/IntelliJIdea2016.3/python/helpers/pydev/pydevd.py", line 1588, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/Users/karim/Library/Application Support/IntelliJIdea2016.3/python/helpers/pydev/pydevd.py", line 971, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Users/karim/dev/tools/featuredev/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 49, in execute
super(Command, self).execute(*args, **options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 88, in handle
self.run(**options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 97, in run
autoreload.main(self.inner_run, None, options)
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 336, in main
reloader(wrapped_main_func, args, kwargs)
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 302, in python_reloader
reloader_thread()
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 272, in reloader_thread
ensure_echo_on()
File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 259, in ensure_echo_on
attr_list = termios.tcgetattr(fd)
termios.error: (25, 'Inappropriate ioctl for device')

 

This is the function where the error is happening.

def ensure_echo_on():
if termios:
fd = sys.stdin
if fd.isatty():
attr_list = termios.tcgetattr(fd)
if not attr_list[3] & termios.ECHO:
attr_list[3] |= termios.ECHO
if hasattr(signal, 'SIGTTOU'):
old_handler = signal.signal(signal.SIGTTOU, signal.SIG_IGN)
else:
old_handler = None
termios.tcsetattr(fd, termios.TCSANOW, attr_list)
if old_handler is not None:
signal.signal(signal.SIGTTOU, old_handler)
1
3 comments

Having the same issue on Ubuntu. It doesn't happen with 'noreload' checked.

1

Please, check https://youtrack.jetbrains.com/issue/PY-21566#comment=27-1742809 and feel free to ask any questions.

0

Please sign in to leave a comment.