#error
1 messages · Page 1 of 1 (latest)
"/home/ove53romosyocom/türkTicaret/türkTicaret/settings.py", line 72
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0x8f in position 1: invalid start byte
What's the code on line 72 of your settings.py file?
WSGI_APPLICATION = 'türkTicaret.wsgi.application'
I'm going to guess it's the ü that's causing issues, but it theoretically shouldn't. What's the full stacktrace of the error? It's rarely a single line.
Traceback (most recent call last):
File "manage.py", line 22, in <module>
main()
File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/ove53romosyocom/virtualenv/türkTicaret/3.7/lib/python3.7/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/home/ove53romosyocom/virtualenv/türkTicaret/3.7/lib/python3.7/site-packages/django/core/management/init.py", line 363, in execute
settings.INSTALLED_APPS
File "/home/ove53romosyocom/virtualenv/türkTicaret/3.7/lib/python3.7/site-packages/django/conf/init.py", line 82, in getattr
self._setup(name)
File "/home/ove53romosyocom/virtualenv/türkTicaret/3.7/lib/python3.7/site-packages/django/conf/init.py", line 69, in _setup
self._wrapped = Settings(settings_module)
File "/home/ove53romosyocom/virtualenv/türkTicaret/3.7/lib/python3.7/site-packages/django/conf/init.py", line 170, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/opt/alt/python37/lib64/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 860, in get_code
File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/ove53romosyocom/türkTicaret/türkTicaret/settings.py", line 72
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0x8f in position 1: invalid start byte
do you have any idea why this error is occuring
My guess is that it's related to the ü character in the directories.
What's the full content of the türkTicaret/wsgi.py file?
yes, you are right. I changed it and the error is disappered
That seems like a bug in Django.
but now I get this error trying to runserver
Django version 3.2.19, using settings 'türkTicaret.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Error: That port is already in use.
That's a common error. Read the error message, "Error: That port is already in use.". What does that suggest to you?
Did you search the web for this error, "Django runserver that port is already in use"
No