question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Keep hitting "AttributeError: 'NoneType' object has no attribute 'split'" in Windows 10

See original GitHub issue

Issue Summary

I’m trying out wagtail on Windows 10 and I constantly see errors in the runserver log output pointing to errors in the http request status excepted in c:\program files\python35\Lib\wsgiref\simple_server.py.

Steps to Reproduce

It’s essential that you provide enough information for someone else to replicate the problem you’re seeing. Simply describing something that’s broken on your current project is not enough!

  1. Set up a virtual environment in Windows 10 with Python 3.5
  2. Run through the instructions at http://docs.wagtail.io/en/stable/getting_started/tutorial.html
  3. By the time you’ve updated the homepage, you’ll have seen this error many times already.

This may be a bug in Python’s wsgi server but it’s far more likely that wagtail is generating an error (due to perhaps not being able to resolve an asset in an unexpected way) which only surfaces once the wsgi code tries to access the corresponding request’s status.

Technical details

  • Virtualenv version: 15.1.0
  • Python version: 3.5.2
  • Django version: 1.11.10
  • Wagtail version: 1.13.1
  • Browser version: Firefox 60
  • Operating System: Windows 10 x64

Log output

This is my log output when I got to the Blog implementation section - the error occurs many many times before then, too:

(venv) i:\temp\mysite>manage makemigrations && manage migrate && manage runserver
Migrations for 'blog':
  blog\migrations\0002_blogpage.py
    - Create model BlogPage
Operations to perform:
  Apply all migrations: admin, auth, blog, contenttypes, home, sessions, taggit, wagtailadmin, wagtailcore, wagtaildocs, wagtailembeds, wagtailforms, wagtailimages, wagtailredirects, wagtailsearch, wagtailusers
Running migrations:
  Applying blog.0002_blogpage... OK
Performing system checks...

System check identified no issues (0 silenced).
February 08, 2018 - 10:59:30
Django version 1.11.10, using settings 'mysite.settings.dev'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[08/Feb/2018 11:00:14] "GET /admin/pages/4/edit/ HTTP/1.1" 200 21893
[08/Feb/2018 11:00:14] "GET /static/wagtailadmin/fonts/robotoslab-regular.woff2 HTTP/1.1" 200 87596
[08/Feb/2018 11:00:17] "GET /admin/api/v2beta/pages/?child_of=1 HTTP/1.1" 200 1079
[08/Feb/2018 11:00:22] "GET /admin/api/v2beta/pages/?child_of=3 HTTP/1.1" 200 1093
[08/Feb/2018 11:00:24] "GET /admin/pages/4/ HTTP/1.1" 200 13076
[08/Feb/2018 11:00:26] "GET /admin/pages/4/add_subpage/ HTTP/1.1" 200 9515
[08/Feb/2018 11:00:28] "GET /admin/pages/add/blog/blogpage/4/ HTTP/1.1" 200 21335
[08/Feb/2018 11:00:48] "POST /admin/pages/add/blog/blogpage/4/ HTTP/1.1" 302 0
[08/Feb/2018 11:00:48] "GET /admin/pages/4/ HTTP/1.1" 200 16688
[08/Feb/2018 11:00:50] "GET /admin/pages/4/add_subpage/ HTTP/1.1" 200 9515
[08/Feb/2018 11:00:51] "GET /admin/pages/add/blog/blogpage/4/ HTTP/1.1" 200 21335
[08/Feb/2018 11:01:08] "POST /admin/pages/add/blog/blogpage/4/ HTTP/1.1" 302 0
[08/Feb/2018 11:01:08] "GET /admin/pages/4/ HTTP/1.1" 200 19959
[08/Feb/2018 11:01:12] "GET /blog/ HTTP/1.1" 200 3167
[08/Feb/2018 11:01:12] "GET /static/css/mysite.css HTTP/1.1" 304 0
[08/Feb/2018 11:01:12] "GET /static/wagtailadmin/css/userbar.css HTTP/1.1" 200 14239
[08/Feb/2018 11:01:12] "GET /static/js/mysite.js HTTP/1.1" 304 0
[08/Feb/2018 11:01:12] "GET /static/wagtailadmin/js/userbar.js HTTP/1.1" 304 0
[08/Feb/2018 11:01:13] "GET /static/wagtailadmin/fonts/wagtail.ttf HTTP/1.1" 200 22896
[08/Feb/2018 11:01:13] "GET /static/wagtailadmin/fonts/opensans-regular.woff2 HTTP/1.1" 200 68812
[08/Feb/2018 11:01:15] "GET /blog/blog-post-2/ HTTP/1.1" 200 2940
[08/Feb/2018 11:01:15] "GET /static/wagtailadmin/css/userbar.css HTTP/1.1" 200 8192
Traceback (most recent call last):
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 138, in run
    self.finish_response()
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 274, in write
    self.send_headers()
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 332, in send_headers
    self.send_preamble()
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 255, in send_preamble
    ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 453, in _write
    result = self.stdout.write(data)
  File "c:\program files\python35\Lib\socket.py", line 593, in write
    return self._sock.send(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
[08/Feb/2018 11:01:15] "GET /static/wagtailadmin/css/userbar.css HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 62192)
Traceback (most recent call last):
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 138, in run
    self.finish_response()
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 274, in write
    self.send_headers()
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 332, in send_headers
    self.send_preamble()
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 255, in send_preamble
    ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 453, in _write
    result = self.stdout.write(data)
  File "c:\program files\python35\Lib\socket.py", line 593, in write
    return self._sock.send(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 141, in run
    self.handle_error()
  File "i:\temp\venv\lib\site-packages\django\core\servers\basehttp.py", line 88, in handle_error
    super(ServerHandler, self).handle_error()
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 368, in handle_error
    self.finish_response()
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 274, in write
    self.send_headers()
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 331, in send_headers
    if not self.origin_server or self.client_is_modern():
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 344, in client_is_modern
    return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\program files\python35\Lib\socketserver.py", line 625, in process_request_thread
    self.finish_request(request, client_address)
  File "c:\program files\python35\Lib\socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "c:\program files\python35\Lib\socketserver.py", line 681, in __init__
    self.handle()
  File "i:\temp\venv\lib\site-packages\django\core\servers\basehttp.py", line 155, in handle
    handler.run(self.server.get_app())
  File "c:\program files\python35\Lib\wsgiref\handlers.py", line 144, in run
    self.close()
  File "c:\program files\python35\Lib\wsgiref\simple_server.py", line 36, in close
    self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
----------------------------------------
[08/Feb/2018 11:01:17] "GET /blog/ HTTP/1.1" 200 3167

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
ruthnphillipscommented, Sep 26, 2018

FWIW, I ran into similar issue when using a Firefox browser, but didnt see any erros when I used Chrome.

3reactions
rob-vandamcommented, Jun 27, 2019

I had the same problems on another application. It was solved by setting DATA_UPLOAD_MAX_NUMBER_FIELDS = in settings.py Standard is 1000 or 2000, I did set it to 10000 Django 2.2 in combination with sqlexpress on Windows 10

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'NoneType' object has no attribute 'split'
It can happen, that the string has nothing inside, than it is "None" type, so what I can suppose is to check first...
Read more >
AttributeError: 'NoneType' object has no attribute 'split'
browser. The error always ends with the line in the ticket Summary. The following is the entire copy of the error. What the...
Read more >
'NoneType' object has no attribute 'split' from arcmap only ...
The error AttributeError: 'NoneType' object has no attribute 'split'. often indicates that the attribute you are trying to split is Null ...
Read more >
nonetype' object has no attribute 'strip' - You.com - You.com
Hello Team, I'm using the current latest version of Dirsearch on a Win10 machine, I have the AttributeError: 'NoneType' object has no attribute...
Read more >
Release notes & updates – Azure CLI - Microsoft Learn
Learn about the latest Azure Command-Line Interface (CLI) release notes and updates for both the current and beta versions of the CLI.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found