'utf-8' codec can't decode byte 0x80 in position 0
Question: Ok when i'm in django I can run the website by the following command.

`sudo python manage.py runserver`

But when I try and use the greed arrow for running the project is gives me
like a dozen errors.

This happens straight away when i set up the project and was hoping if anyone
could help.

    
    
    Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x10484fbf8>
    Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
    autoreload.raise_last_exception()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
    six.reraise(*_exception)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/apps/registry.py", line 115, in populate
    app_config.ready()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/contrib/admin/apps.py", line 22, in ready
    self.module.autodiscover()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/contrib/admin/__init__.py", line 26, in autodiscover
    autodiscover_modules('admin', register_to=site)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/utils/module_loading.py", line 50, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 986, in _gcd_import
    File "<frozen importlib._bootstrap>", line 969, in _find_and_load
    File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 662, in exec_module
    File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/contrib/auth/admin.py", line 7, in <module>
    from django.contrib.auth.forms import (
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/contrib/auth/forms.py", line 264, in <module>
    class SetPasswordForm(forms.Form):
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/contrib/auth/forms.py", line 275, in SetPasswordForm
    help_text=password_validation.password_validators_help_text_html())
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/contrib/auth/password_validation.py", line 85, in password_validators_help_text_html
    help_texts = password_validators_help_texts(password_validators)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/contrib/auth/password_validation.py", line 74, in password_validators_help_texts
    password_validators = get_default_password_validators()
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/contrib/auth/password_validation.py", line 21, in get_default_password_validators
    return get_password_validators(settings.AUTH_PASSWORD_VALIDATORS)
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/contrib/auth/password_validation.py", line 32, in get_password_validators
    validators.append(klass(**validator.get('OPTIONS', {})))
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/contrib/auth/password_validation.py", line 170, in __init__
    common_passwords_lines = gzip.open(password_list_path).read().decode('utf-8').splitlines()
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
    

I know…


Answer: I was getting a similar error for a different issue, but it turned out that it
was a problem with the way PyCharm handled Unicode/UTF-8 with Python 3. I
ended up doing the following to get the error to go away.

Add following line in the file "pycharm.exe.vmoptions":

    
    
    -Dfile.encoding=UTF-8
    

> Source: [Why unicode string is not shown on PyCharm's
> console?](http://stackoverflow.com/questions/33512828/why-unicode-string-is-
> not-shown-on-pycharms-console)

Hope this helps!

