vladimirnani / DjangoCommands

ST2/ST3 plugin for managing django project
29 stars 14 forks source link

Errors thrown in Django Manage Commands #26

Closed DougBeney closed 7 years ago

DougBeney commented 8 years ago

After installing the plugin I noticed I couldn't use both 'Set Project Interpreter' and 'Set Virtual Environment'.

I took a look at the Sublime console. It turns out that whenever I hit CMD+SHIFT+P to open package control a bunch of errors related to django-commands shows up.

Here are the errors:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 457, in is_enabled_
    ret = self.is_enabled()
  File "django-commands in /Users/dougbeney/Library/Application Support/Sublime Text 3/Installed Packages/Django Manage Commands.sublime-package", line 320, in is_enabled
  File "django-commands in /Users/dougbeney/Library/Application Support/Sublime Text 3/Installed Packages/Django Manage Commands.sublime-package", line 69, in get_version
  File "./python3.3/subprocess.py", line 576, in check_output

  File "./python3.3/subprocess.py", line 819, in __init__

  File "./python3.3/subprocess.py", line 1370, in _execute_child
    p2cread, p2cwrite = -1, -1
  File "./python3.3/os.py", line 791, in fsencode

TypeError: expect bytes or str, not NoneType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 459, in is_enabled_
    ret = self.is_enabled()
  File "django-commands in /Users/dougbeney/Library/Application Support/Sublime Text 3/Installed Packages/Django Manage Commands.sublime-package", line 320, in is_enabled
  File "django-commands in /Users/dougbeney/Library/Application Support/Sublime Text 3/Installed Packages/Django Manage Commands.sublime-package", line 69, in get_version
  File "./python3.3/subprocess.py", line 576, in check_output

  File "./python3.3/subprocess.py", line 819, in __init__

  File "./python3.3/subprocess.py", line 1370, in _execute_child
    p2cread, p2cwrite = -1, -1
  File "./python3.3/os.py", line 791, in fsencode

TypeError: expect bytes or str, not NoneType
mxdevmanuel commented 7 years ago

The error is now catched and dealt with on runtime to avoid this error and along with other changes this fix will be present in next release