old_contents: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  
  import os
  import sys
  import re
  import pip
  from setuptools import setup, find_packages
  from pip.req import parse_requirements
  
  
  if sys.argv[-1] == "publish":
      os.system("python setup.py sdist upload")
      sys.exit()
  
  
  with open('README.md') as f:
      readme = f.read()
  
  # Handle requirements
  requires = parse_requirements("requirements/install.txt",
                                session=pip.download.PipSession())
  install_requires = [str(ir.req) for ir in requires]
  
  requires = parse_requirements("requirements/tests.txt",
                                session=pip.download.PipSession())
  tests_require = [str(ir.req) for ir in requires]
  
  # Convert markdown to rst
  try:
      from pypandoc import convert
      long_description = convert("README.md", "rst")
  except:
      long_description = ""
  
  version = ''
  with open('django_react_templatetags/__init__.py', 'r') as fd:
      version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
                          fd.read(), re.MULTILINE).group(1)
  
  setup(
      name="django_react_templatetags",
      version=version,
      description=("This django library allows you to add React components into your django templates."),  # NOQA
      long_description=long_description,
      author="Fröjd",
      author_email="martin@marteinn.se",
      url="https://github.com/frojd/django-react-templatetags",
      packages=find_packages(exclude=('tests*',)),
      include_package_data=True,
      install_requires=install_requires,
      extras_require={
          'ssr': ['requests'],
      },
      tests_require=tests_require,
      license="MIT",
      zip_safe=False,
      classifiers=[
          "Development Status :: 5 - Production/Stable",
          'Environment :: Web Environment',
          "Intended Audience :: Developers",
          "Natural Language :: English",
          'Intended Audience :: Developers',
          "License :: OSI Approved :: MIT License",
          "Programming Language :: Python",
          'Programming Language :: Python :: 2',
          "Programming Language :: Python :: 2.7",
          'Framework :: Django',
          'Topic :: Utilities',
      ],
  )
  
new_contents: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  
  import io
  import os
  import sys
  import re
  import pip
  from setuptools import setup, find_packages
  from pip.req import parse_requirements
  
  
  if sys.argv[-1] == "publish":
      os.system("python setup.py sdist upload")
      sys.exit()
  
  
  with open('README.md') as f:
      readme = f.read()
  
  # Handle requirements
  requires = parse_requirements("requirements/install.txt",
                                session=pip.download.PipSession())
  install_requires = [str(ir.req) for ir in requires]
  
  requires = parse_requirements("requirements/tests.txt",
                                session=pip.download.PipSession())
  tests_require = [str(ir.req) for ir in requires]
  
  # Convert markdown to rst
  try:
      from pypandoc import convert
      long_description = convert("README.md", "rst")
  except:
      long_description = ""
  
  version = ''
  with io.open('wagtailgeowidget/__init__.py', 'r', encoding='utf8') as fd:
      version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
                          fd.read(), re.MULTILINE).group(1)
  
  setup(
      name="django_react_templatetags",
      version=version,
      description=("This django library allows you to add React components into your django templates."),  # NOQA
      long_description=long_description,
      author="Fröjd",
      author_email="martin@marteinn.se",
      url="https://github.com/frojd/django-react-templatetags",
      packages=find_packages(exclude=('tests*',)),
      include_package_data=True,
      install_requires=install_requires,
      extras_require={
          'ssr': ['requests'],
      },
      tests_require=tests_require,
      license="MIT",
      zip_safe=False,
      classifiers=[
          "Development Status :: 5 - Production/Stable",
          'Environment :: Web Environment',
          "Intended Audience :: Developers",
          "Natural Language :: English",
          'Intended Audience :: Developers',
          "License :: OSI Approved :: MIT License",
          "Programming Language :: Python",
          'Programming Language :: Python :: 2',
          "Programming Language :: Python :: 2.7",
          'Framework :: Django',
          'Topic :: Utilities',
      ],
  )
  
subject: Solve encoding error in init file