Some problems with running django
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 .wrapper at 0x046A6540> Traceback (most recent call last): File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper fn(*args, **kwargs) File "C:\Program Files (x86)\Python36-32\lib\site-packages\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-packages\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-packages\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/msgid/django-users/c7031dac-392a-46ed-9fdc-f202f6e8a9f1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Some problems with running django
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 : > 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, 曹逍遙 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 > check_errors..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 8
Re: Some problems with running django
Hello Julio Biason He is the initial version I did it according to the tutorial [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:04:49 2018-06-07 13:02 GMT+08:00 曹逍遙 : > 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 : > >> 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, 曹逍遙 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 >> check_errors..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 &q
Re: Some problems with running django
Hello Julio Biason I just changed my host name That's right, it's really a question of the host name. Now normal startup~~ Thank you very much Thank you very much 👍 [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 下午10:08:43 2018-06-07 20:46 GMT+08:00 Julio Biason : > 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, 曹逍遙 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 : >> >>> 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, 曹逍遙 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 >>> check_errors..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) >>>