django - 'utf-8' codec can't decode byte 0x80 in position 0 -
ok when i'm in django can run website following command.
sudo python manage.py runserver
but when try , use greed arrow running project gives me dozen errors.
this happens straight away when set project , hoping if help.
unhandled exception in thread started <function check_errors.<locals>.wrapper @ 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> 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…
i getting similar error different issue, turned out problem way pycharm handled unicode/utf-8 python 3. ended doing following error go away.
add following line in file "pycharm.exe.vmoptions":
-dfile.encoding=utf-8
hope helps!
Comments
Post a Comment