Skip to main content
 首页 » 编程设计

python之线程中的 Django 未处理异常由 function check_errors.locals>.wrapper at 0x035D2618> 启动

2024年12月31日22落叶

目前我要去参加 Django 类(class),学习网络编程,并且作为 IDLE,我们正在使用 PyCharm。

当我将以下命令写入终端 (cmd) 时,我收到了一个 unicode 错误,我搜索了与此相关的其他主题,但找不到正确的答案。 我的意思是我问这个不是为了问问题。

最后,我会把所有的命令和回溯发给你,

我的名字包含 Ö 和 Ü 并且它也在我的 C: 用户文件夹名称中,这就是为什么我认为问题是因为那个,这就是为什么我刚刚卸载 python 并将它重新安装到 D: 中的一个新文件夹但是问题还没有解决。在使用以下代码运行服务器后,我仍然收到相同的错误:

python manage.py runserver 

打字时:

django-admin startproject myblog_ 
cd myblog_ 
python manage.py startapp gonderiler 

这些,我没有收到任何错误,“myblog_”是项目名称,“gonderiler”是应用程序。姓名。但是当我运行服务器时,我收到以下错误: 还有

python manage.py migrate 

没有解决问题。

谢谢大家!我希望我们能一起找到解决方案。 我只是从 cmd 复制了所有(不仅是回溯)以使其更清楚,

Microsoft Windows [Sürüm 6.1.7601] 
Telif Hakkı (c) 2009 Microsoft Corporation. Tüm hakları saklıdır. 
 
(yeni_django) D:\yazilim24 django\dnm>django-admin startproject myblog_ 
 
(yeni_django) D:\yazilim24 django\dnm>cd myblog_ 
 
(yeni_django) D:\yazilim24 django\dnm\myblog_>python manage.py startapp gonderiler 
 
(yeni_django) D:\yazilim24 django\dnm\myblog_>python manage.py runserver 
Performing system checks... 
 
System check identified no issues (0 silenced). 
 
You have 15 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. 
Run 'python manage.py migrate' to apply them. 
August 09, 2018 - 11:19:49 
Django version 2.1, using settings 'myblog_.settings' 
Starting development server at http://127.0.0.1:8000/ 
Quit the server with CTRL-BREAK. 
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x035D2618> 
Traceback (most recent call last): 
  File "D:\yazilim24 django\dnm\venv\yeni_django\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper 
    fn(*args, **kwargs) 
  File "D:\yazilim24 django\dnm\venv\yeni_django\lib\site-packages\django\core\management\commands\runserver.py", line 140, in inner_run 
    ipv6=self.use_ipv6, threading=threading, server_cls=self.server_cls) 
  File "D:\yazilim24 django\dnm\venv\yeni_django\lib\site-packages\django\core\servers\basehttp.py", line 164, in run 
    httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6) 
  File "D:\yazilim24 django\dnm\venv\yeni_django\lib\site-packages\django\core\servers\basehttp.py", line 67, in __init__ 
    super().__init__(*args, **kwargs) 
  File "D:\py37\lib\socketserver.py", line 450, in __init__ 
    self.server_bind() 
  File "D:\py37\lib\wsgiref\simple_server.py", line 52, in server_bind 
    HTTPServer.server_bind(self) 
  File "D:\py37\lib\http\server.py", line 140, in server_bind 
    self.server_name = socket.getfqdn(host) 
  File "D:\py37\lib\socket.py", line 677, in getfqdn 
    hostname, aliases, ipaddrs = gethostbyaddr(name) 
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd6 in position 11: invalid continuation byte 

请您参考如下方法:

大家好,我已经解决了我自己的问题; https://www.howtogeek.com/howto/windows-vista/change-your-computer-name-in-windows-vista/

无论谁遇到同样的问题,只需使用通用字符更改您的计算机名称即可。程序的路径并不重要。