1

When I try to run python manage.py makemigrations, python manage.py migrate or even python manage.py createsuperuse i caught a error AttributeError: '_io.BufferedWriter' object has no attribute 'encoding'. I think this is a problem with manage.py script because i was try migrate with different db and every time i was have a same problem.

Traceback:

Traceback (most recent call last):
File "webapp\manage.py", line 10, in <modu
  execute_from_command_line(sys.argv)
File "\AppData\Local\Programs\Python\Python35\lib\site-packages
  utility.execute()
File "\AppData\Local\Programs\Python\Python35\lib\site-packages
  self.fetch_command(subcommand).run_from_argv(self.argv)
File "\AppData\Local\Programs\Python\Python35\lib\site-packages
  self.execute(*args, **cmd_options)
File "\AppData\Local\Programs\Python\Python35\lib\site-packages
  return super(Command, self).execute(*args, **options)
File "\AppData\Local\Programs\Python\Python35\lib\site-packages
  output = self.handle(*args, **options)
File "\AppData\Local\Programs\Python\Python35\lib\site-packages
  username = self.get_input_data(self.username_field, input_msg, default_usern
File "\AppData\Local\Programs\Python\Python35\lib\site-packages
  raw_value = input(message)
File "\AppData\Local\Programs\Python\Python35\lib\codecs.py", l
  return getattr(self.stream, name)
AttributeError: '_io.BufferedWriter' object has no attribute 'encoding'
snpefk
  • 11
  • 1
  • looks like you are trying to run python 2 code on python 3. http://stackoverflow.com/questions/26967509/attributeerror-io-textiowrapper-object-has-no-attribute-next-python#26967622 – Sardorbek Imomaliev Oct 26 '16 at 06:08
  • @SardorbekImomaliev I think it's unlikely. I use pycharm and i have only py3 interpretator (3.5.1) so all package that I'm install a py3 version. And if i wrote code in python2 version IDE was highlight it. – snpefk Oct 26 '16 at 07:23

0 Answers0