Hi, I took a longer look at the error and it seems the error raised when the server was starting up. The code tries to figure out your machine name -- a thing that's stored, on Linux systems, on /etc/hostname and on OS X on Settings -> Sharing -- and *that* name has special characters (I'd guess it could be something like "曹逍遙's computer").
I don't have enough knowledge about Windows to know where you could change that. On Thu, Jun 7, 2018 at 2:02 AM, 曹逍遙 <exuberante...@gmail.com> wrote: > Julio Biason 您好 > > Thank you > > I am a beginner > > mytestsite/settings.py > I don't know where to change > I did not change him > > too difficult > > I do not know what to do > > > > > > [image: Mailtrack] > <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> > Sender > notified by > Mailtrack > <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> > 18/06/07 > 下午1:01:38 > > 2018-06-06 20:42 GMT+08:00 Julio Biason <julio.bia...@azion.com>: > >> Hi, >> >> UnicodeDecodeErrors are quite common in Python 2, when you add an UTF8 >> character and the system is not set up for it (usually, you need to start >> your code with `# encoding: utf-8`). >> >> But the fact that this seems to affect socket is weird as heck. I'd check >> anything in mytestsite/settings.py to make sure there isn't an UTF8 string >> in anything related to server name (things like DATABASE, in which you >> define the host for your database and the like). >> >> On Wed, Jun 6, 2018 at 3:50 AM, 曹逍遙 <exuberante...@gmail.com> wrote: >> >>> Hello >>> >>> I run => python manage.py runserver >>> >>> get result >>> ------------------------------------------------------------ >>> ------------------- >>> C:\mydjango\mytestsite>python manage.py runserver >>> Performing system checks... >>> >>> System check identified no issues (0 silenced). >>> >>> You have 14 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. >>> June 06, 2018 - 14:25:25 >>> Django version 2.0.6, using settings 'mytestsite.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 0x046A6540> >>> Traceback (most recent call last): >>> File "C:\Program Files (x86)\Python36-32\lib\site-pac >>> kages\django\utils\autoreload.py", line 225, in wrapper >>> fn(*args, **kwargs) >>> File "C:\Program Files (x86)\Python36-32\lib\site-pac >>> kages\django\core\management\commands\runserver.py", line 142, in >>> inner_run >>> ipv6=self.use_ipv6, threading=threading, server_cls=self.server_cls) >>> File "C:\Program Files (x86)\Python36-32\lib\site-pac >>> kages\django\core\servers\basehttp.py", line 163, in run >>> httpd = httpd_cls(server_address, WSGIRequestHandler, ipv6=ipv6) >>> File "C:\Program Files (x86)\Python36-32\lib\site-pac >>> kages\django\core\servers\basehttp.py", line 66, in __init__ >>> super().__init__(*args, **kwargs) >>> File "C:\Program Files (x86)\Python36-32\lib\socketserver.py", line >>> 453, in __init__ >>> self.server_bind() >>> File "C:\Program Files (x86)\Python36-32\lib\wsgiref\simple_server.py", >>> line 50, in server_bind >>> HTTPServer.server_bind(self) >>> File "C:\Program Files (x86)\Python36-32\lib\http\server.py", line >>> 138, in server_bind >>> self.server_name = socket.getfqdn(host) >>> File "C:\Program Files (x86)\Python36-32\lib\socket.py", line 673, in >>> getfqdn >>> hostname, aliases, ipaddrs = gethostbyaddr(name) >>> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb1 in position 0: >>> invalid start byte >>> ------------------------------------------------------------ >>> ------------------------------------------------------------ >>> ------------------------------------------ >>> >>> Don't know what to do? >>> >>> django --V 2.0.6 >>> win10 >>> >>> >>> >>> >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to django-users+unsubscr...@googlegroups.com. >>> To post to this group, send email to django-users@googlegroups.com. >>> Visit this group at https://groups.google.com/group/django-users. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/django-users/c7031dac-392a-46ed-9fdc-f202f6e8a9f1%40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/c7031dac-392a-46ed-9fdc-f202f6e8a9f1%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> *Julio Biason*, Sofware Engineer >> *AZION* | Deliver. Accelerate. Protect. >> Office: +55 51 3083 8101 <callto:+555130838101> | Mobile: +55 51 >> <callto:+5551996209291>*99907 0554* >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@googlegroups.com. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/django-users/CAEM7gE3p-5qcZmMC_VvLVSt2dBBgKrK-EaFoUYmL- >> Rfc0_vUGg%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAEM7gE3p-5qcZmMC_VvLVSt2dBBgKrK-EaFoUYmL-Rfc0_vUGg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/CAAEACMvvZnO9FxO2hH1BNfGJhvo5KUdNC5C6Ug%3D8REimZcYiJQ% > 40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAAEACMvvZnO9FxO2hH1BNfGJhvo5KUdNC5C6Ug%3D8REimZcYiJQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- *Julio Biason*, Sofware Engineer *AZION* | Deliver. Accelerate. Protect. Office: +55 51 3083 8101 <callto:+555130838101> | Mobile: +55 51 <callto:+5551996209291>*99907 0554* -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEM7gE2%3DJUE3YowrrewjjHCqOHTGRfVmcsBkm7WdoVrrXvd2jQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.