Kozea / Radicale

A simple CalDAV (calendar) and CardDAV (contact) server.
https://radicale.org
GNU General Public License v3.0
3.36k stars 438 forks source link

Error: 'NoneType' object has no attribute 'split' #748

Closed qfvldaa2xn closed 1 month ago

qfvldaa2xn commented 6 years ago

I see following error message several times in my logs:

2017-11-28 12:43:47,999 - [745ff460] INFO: PROPFIND response status for '/daniel/addressbook.vcf/' with depth '0' in 1.209 seconds: 207 Multi-Status
2017-11-28 12:43:48,112 - [745ff460] ERROR: An exception occurred during request: 'NoneType' object has no attribute 'split'

Unfortunately I don't know how to reproduce the error :/

I use radicale 2.1.8 behind nginx with secure connections.

As clients I tried Evolution 3.26.2.1 and DAVdroid 1.9. I see many requests for addressbook.vcf in the log without the error. The error occurs with both clients but not always. Also --verify-storage completed without any errors.

I am not sure how to interpret this error!?

Unrud commented 6 years ago

Start Radicale with the --debug argument to get the full stack trace for the error.

qfvldaa2xn commented 6 years ago

Does this one help?

2017-11-28 12:41:23,823 - [745ff460] INFO: OPTIONS request for '/daniel/addressbook.vcf/' received from '192.168.1.29' (forwarded by 127.0.0.1) using 'Evolution/3.26.2.1'
2017-11-28 12:41:23,885 - [745ff460] DEBUG: Request headers:
{'CONTENT_LENGTH': '',
 'CONTENT_TYPE': 'text/plain',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_LANGUAGE': 'en-us, en;q=0.9',
 'HTTP_AUTHORIZATION': 'Basic **masked**',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'close',
 'HTTP_HOST': 'localhost:5232',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Evolution/3.26.2.1',
 'HTTP_X_FORWARDED_FOR': '192.168.1.29',
 'HTTP_X_REMOTE_USER': 'daniel',
 'HTTP_X_SCRIPT_NAME': '/radicale',
 'PATH_INFO': '/daniel/addressbook.vcf/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_CERTIFICATE': {'issuer': ((('countryName', 'DE'),),
                                   (('stateOrProvinceName', 'Some-State'),),
                                   (('organizationName',
                                     '...removed...'),)),
                        'notAfter': 'Feb  5 17:03:08 2045 GMT',
                        'notBefore': 'Sep 21 17:03:08 2017 GMT',
                        'serialNumber': '...removed...',
                        'subject': ((('countryName', 'DE'),),
                                    (('stateOrProvinceName', 'Some-State'),),
                                    (('organizationName',
                                      '...removed...'),)),
                        'version': 3},
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'OPTIONS',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'localhost.localdomain',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SOFTWARE': 'WSGIServer/0.2',
 'wsgi.errors': <_io.StringIO object at 0x75bd1120>,
 'wsgi.file_wrapper': <class 'wsgiref.util.FileWrapper'>,
 'wsgi.input': <_io.BufferedReader name=7>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2017-11-28 12:41:23,888 - [745ff460] DEBUG: Script name overwritten by client: '/radicale'
2017-11-28 12:41:23,892 - [745ff460] DEBUG: Sanitized script name: '/radicale'
2017-11-28 12:41:23,896 - [745ff460] DEBUG: Sanitized path: '/daniel/addressbook.vcf/'
2017-11-28 12:41:23,900 - [745ff460] INFO: Successful login: 'daniel'
2017-11-28 12:41:23,918 - [745ff460] INFO: OPTIONS response status for '/daniel/addressbook.vcf/' in 0.095 seconds: 200 OK
2017-11-28 12:41:24,008 - [745ff460] INFO: PROPFIND request for '/daniel/addressbook.vcf/' with depth '0' received from '192.168.1.29' (forwarded by 127.0.0.1) using 'Evolution/3.26.2.1'
2017-11-28 12:41:24,071 - [745ff460] DEBUG: Request headers:
{'CONTENT_LENGTH': '113',
 'CONTENT_TYPE': 'application/xml; charset="utf-8"',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_LANGUAGE': 'en-us, en;q=0.9',
 'HTTP_AUTHORIZATION': 'Basic **masked**',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'close',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': 'localhost:5232',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Evolution/3.26.2.1',
 'HTTP_X_FORWARDED_FOR': '192.168.1.29',
 'HTTP_X_REMOTE_USER': 'daniel',
 'HTTP_X_SCRIPT_NAME': '/radicale',
 'PATH_INFO': '/daniel/addressbook.vcf/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_CERTIFICATE': {'issuer': ((('countryName', 'DE'),),
                                   (('stateOrProvinceName', 'Some-State'),),
                                   (('organizationName',
                                     '...removed...'),)),
                        'notAfter': 'Feb  5 17:03:08 2045 GMT',
                        'notBefore': 'Sep 21 17:03:08 2017 GMT',
                        'serialNumber': '...removed...',
                        'subject': ((('countryName', 'DE'),),
                                    (('stateOrProvinceName', 'Some-State'),),
                                    (('organizationName',
                                      '...removed...'),)),
                        'version': 3},
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'localhost.localdomain',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SOFTWARE': 'WSGIServer/0.2',
 'wsgi.errors': <_io.StringIO object at 0x75bd1120>,
 'wsgi.file_wrapper': <class 'wsgiref.util.FileWrapper'>,
 'wsgi.input': <_io.BufferedReader name=7>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2017-11-28 12:41:24,074 - [745ff460] DEBUG: Script name overwritten by client: '/radicale'
2017-11-28 12:41:24,078 - [745ff460] DEBUG: Sanitized script name: '/radicale'
2017-11-28 12:41:24,082 - [745ff460] DEBUG: Sanitized path: '/daniel/addressbook.vcf/'
2017-11-28 12:41:24,086 - [745ff460] INFO: Successful login: 'daniel'
2017-11-28 12:41:24,113 - [745ff460] DEBUG: Request content:
<?xml version="1.0"?>
<propfind xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <prop>
    <CS:getctag />
  </prop>
</propfind>

2017-11-28 12:41:24,135 - [745ff460] DEBUG: 'daniel' has read and write access to collection 'daniel/addressbook.vcf'
2017-11-28 12:41:24,589 - [745ff460] DEBUG: Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/radicale/daniel/addressbook.vcf/</href>
    <propstat>
      <prop>
        <CS:getctag>"9c83a9678ca24a769314bf013a3ceaca"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

2017-11-28 12:41:24,601 - [745ff460] INFO: PROPFIND response status for '/daniel/addressbook.vcf/' with depth '0' in 0.594 seconds: 207 Multi-Status
2017-11-28 12:41:24,719 - [745ff460] INFO: PROPFIND request for '/daniel/addressbook.vcf/' with depth '0' received from '192.168.1.29' (forwarded by 127.0.0.1) using 'Evolution/3.26.2.1'
2017-11-28 12:41:24,783 - [745ff460] DEBUG: Request headers:
{'CONTENT_LENGTH': '113',
 'CONTENT_TYPE': 'application/xml; charset="utf-8"',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_LANGUAGE': 'en-us, en;q=0.9',
 'HTTP_AUTHORIZATION': 'Basic **masked**',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'close',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': 'localhost:5232',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Evolution/3.26.2.1',
 'HTTP_X_FORWARDED_FOR': '192.168.1.29',
 'HTTP_X_REMOTE_USER': 'daniel',
 'HTTP_X_SCRIPT_NAME': '/radicale',
 'PATH_INFO': '/daniel/addressbook.vcf/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_CERTIFICATE': {'issuer': ((('countryName', 'DE'),),
                                   (('stateOrProvinceName', 'Some-State'),),
                                   (('organizationName',
                                     '...removed...'),)),
                        'notAfter': 'Feb  5 17:03:08 2045 GMT',
                        'notBefore': 'Sep 21 17:03:08 2017 GMT',
                        'serialNumber': '...removed...',
                        'subject': ((('countryName', 'DE'),),
                                    (('stateOrProvinceName', 'Some-State'),),
                                    (('organizationName',
                                      '...removed...'),)),
                        'version': 3},
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'localhost.localdomain',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SOFTWARE': 'WSGIServer/0.2',
 'wsgi.errors': <_io.StringIO object at 0x75bd1120>,
 'wsgi.file_wrapper': <class 'wsgiref.util.FileWrapper'>,
 'wsgi.input': <_io.BufferedReader name=7>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2017-11-28 12:41:24,786 - [745ff460] DEBUG: Script name overwritten by client: '/radicale'
2017-11-28 12:41:24,790 - [745ff460] DEBUG: Sanitized script name: '/radicale'
2017-11-28 12:41:24,794 - [745ff460] DEBUG: Sanitized path: '/daniel/addressbook.vcf/'
2017-11-28 12:41:24,798 - [745ff460] INFO: Successful login: 'daniel'
2017-11-28 12:41:24,825 - [745ff460] DEBUG: Request content:
<?xml version="1.0"?>
<propfind xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <prop>
    <CS:getctag />
  </prop>
</propfind>

2017-11-28 12:41:24,847 - [745ff460] DEBUG: 'daniel' has read and write access to collection 'daniel/addressbook.vcf'
2017-11-28 12:41:25,299 - [745ff460] DEBUG: Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/radicale/daniel/addressbook.vcf/</href>
    <propstat>
      <prop>
        <CS:getctag>"9c83a9678ca24a769314bf013a3ceaca"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

2017-11-28 12:41:25,316 - [745ff460] INFO: PROPFIND response status for '/daniel/addressbook.vcf/' with depth '0' in 0.597 seconds: 207 Multi-Status
2017-11-28 12:43:46,346 - [745ff460] INFO: OPTIONS request for '/daniel/addressbook.vcf/' received from '192.168.1.29' (forwarded by 127.0.0.1) using 'Evolution/3.26.2.1'
2017-11-28 12:43:46,483 - [745ff460] DEBUG: Request headers:
{'CONTENT_LENGTH': '',
 'CONTENT_TYPE': 'text/plain',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_LANGUAGE': 'en-us, en;q=0.9',
 'HTTP_AUTHORIZATION': 'Basic **masked**',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'close',
 'HTTP_HOST': 'localhost:5232',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Evolution/3.26.2.1',
 'HTTP_X_FORWARDED_FOR': '192.168.1.29',
 'HTTP_X_REMOTE_USER': 'daniel',
 'HTTP_X_SCRIPT_NAME': '/radicale',
 'PATH_INFO': '/daniel/addressbook.vcf/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_CERTIFICATE': {'issuer': ((('countryName', 'DE'),),
                                   (('stateOrProvinceName', 'Some-State'),),
                                   (('organizationName',
                                     '...removed...'),)),
                        'notAfter': 'Feb  5 17:03:08 2045 GMT',
                        'notBefore': 'Sep 21 17:03:08 2017 GMT',
                        'serialNumber': '...removed...',
                        'subject': ((('countryName', 'DE'),),
                                    (('stateOrProvinceName', 'Some-State'),),
                                    (('organizationName',
                                      '...removed...'),)),
                        'version': 3},
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'OPTIONS',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'localhost.localdomain',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SOFTWARE': 'WSGIServer/0.2',
 'wsgi.errors': <_io.StringIO object at 0x75bd1120>,
 'wsgi.file_wrapper': <class 'wsgiref.util.FileWrapper'>,
 'wsgi.input': <_io.BufferedReader name=7>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2017-11-28 12:43:46,486 - [745ff460] DEBUG: Script name overwritten by client: '/radicale'
2017-11-28 12:43:46,501 - [745ff460] DEBUG: Sanitized script name: '/radicale'
2017-11-28 12:43:46,505 - [745ff460] DEBUG: Sanitized path: '/daniel/addressbook.vcf/'
2017-11-28 12:43:46,515 - [745ff460] INFO: Successful login: 'daniel'
2017-11-28 12:43:46,554 - [745ff460] INFO: OPTIONS response status for '/daniel/addressbook.vcf/' in 0.208 seconds: 200 OK
2017-11-28 12:43:46,790 - [745ff460] INFO: PROPFIND request for '/daniel/addressbook.vcf/' with depth '0' received from '192.168.1.29' (forwarded by 127.0.0.1) using 'Evolution/3.26.2.1'
2017-11-28 12:43:46,915 - [745ff460] DEBUG: Request headers:
{'CONTENT_LENGTH': '113',
 'CONTENT_TYPE': 'application/xml; charset="utf-8"',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_LANGUAGE': 'en-us, en;q=0.9',
 'HTTP_AUTHORIZATION': 'Basic **masked**',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'close',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': 'localhost:5232',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Evolution/3.26.2.1',
 'HTTP_X_FORWARDED_FOR': '192.168.1.29',
 'HTTP_X_REMOTE_USER': 'daniel',
 'HTTP_X_SCRIPT_NAME': '/radicale',
 'PATH_INFO': '/daniel/addressbook.vcf/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_CERTIFICATE': {'issuer': ((('countryName', 'DE'),),
                                   (('stateOrProvinceName', 'Some-State'),),
                                   (('organizationName',
                                     '...removed...'),)),
                        'notAfter': 'Feb  5 17:03:08 2045 GMT',
                        'notBefore': 'Sep 21 17:03:08 2017 GMT',
                        'serialNumber': '...removed...',
                        'subject': ((('countryName', 'DE'),),
                                    (('stateOrProvinceName', 'Some-State'),),
                                    (('organizationName',
                                      '...removed...'),)),
                        'version': 3},
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'localhost.localdomain',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SOFTWARE': 'WSGIServer/0.2',
 'wsgi.errors': <_io.StringIO object at 0x75bd1120>,
 'wsgi.file_wrapper': <class 'wsgiref.util.FileWrapper'>,
 'wsgi.input': <_io.BufferedReader name=7>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2017-11-28 12:43:46,929 - [745ff460] DEBUG: Script name overwritten by client: '/radicale'
2017-11-28 12:43:46,933 - [745ff460] DEBUG: Sanitized script name: '/radicale'
2017-11-28 12:43:46,948 - [745ff460] DEBUG: Sanitized path: '/daniel/addressbook.vcf/'
2017-11-28 12:43:46,952 - [745ff460] INFO: Successful login: 'daniel'
2017-11-28 12:43:47,010 - [745ff460] DEBUG: Request content:
<?xml version="1.0"?>
<propfind xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <prop>
    <CS:getctag />
  </prop>
</propfind>

2017-11-28 12:43:47,052 - [745ff460] DEBUG: 'daniel' has read and write access to collection 'daniel/addressbook.vcf'
2017-11-28 12:43:47,966 - [745ff460] DEBUG: Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/radicale/daniel/addressbook.vcf/</href>
    <propstat>
      <prop>
        <CS:getctag>"9c83a9678ca24a769314bf013a3ceaca"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

2017-11-28 12:43:47,999 - [745ff460] INFO: PROPFIND response status for '/daniel/addressbook.vcf/' with depth '0' in 1.209 seconds: 207 Multi-Status
2017-11-28 12:43:48,112 - [745ff460] ERROR: An exception occurred during request: 'NoneType' object has no attribute 'split'
2017-11-28 12:44:49,899 - [745ff460] INFO: OPTIONS request for '/daniel/addressbook.vcf/' received from '192.168.1.29' (forwarded by 127.0.0.1) using 'Evolution/3.26.2.1'
2017-11-28 12:44:49,962 - [745ff460] DEBUG: Request headers:
{'CONTENT_LENGTH': '',
 'CONTENT_TYPE': 'text/plain',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_LANGUAGE': 'en-us, en;q=0.9',
 'HTTP_AUTHORIZATION': 'Basic **masked**',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'close',
 'HTTP_HOST': 'localhost:5232',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Evolution/3.26.2.1',
 'HTTP_X_FORWARDED_FOR': '192.168.1.29',
 'HTTP_X_REMOTE_USER': 'daniel',
 'HTTP_X_SCRIPT_NAME': '/radicale',
 'PATH_INFO': '/daniel/addressbook.vcf/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_CERTIFICATE': {'issuer': ((('countryName', 'DE'),),
                                   (('stateOrProvinceName', 'Some-State'),),
                                   (('organizationName',
                                     '...removed...'),)),
                        'notAfter': 'Feb  5 17:03:08 2045 GMT',
                        'notBefore': 'Sep 21 17:03:08 2017 GMT',
                        'serialNumber': '...removed...',
                        'subject': ((('countryName', 'DE'),),
                                    (('stateOrProvinceName', 'Some-State'),),
                                    (('organizationName',
                                      '...removed...'),)),
                        'version': 3},
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'OPTIONS',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'localhost.localdomain',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SOFTWARE': 'WSGIServer/0.2',
 'wsgi.errors': <_io.StringIO object at 0x75bd1120>,
 'wsgi.file_wrapper': <class 'wsgiref.util.FileWrapper'>,
 'wsgi.input': <_io.BufferedReader name=7>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2017-11-28 12:44:49,966 - [745ff460] DEBUG: Script name overwritten by client: '/radicale'
2017-11-28 12:44:49,970 - [745ff460] DEBUG: Sanitized script name: '/radicale'
2017-11-28 12:44:49,974 - [745ff460] DEBUG: Sanitized path: '/daniel/addressbook.vcf/'
2017-11-28 12:44:49,978 - [745ff460] INFO: Successful login: 'daniel'
2017-11-28 12:44:49,995 - [745ff460] INFO: OPTIONS response status for '/daniel/addressbook.vcf/' in 0.096 seconds: 200 OK
2017-11-28 12:44:50,068 - [745ff460] INFO: PROPFIND request for '/daniel/addressbook.vcf/' with depth '0' received from '192.168.1.29' (forwarded by 127.0.0.1) using 'Evolution/3.26.2.1'
2017-11-28 12:44:50,131 - [745ff460] DEBUG: Request headers:
{'CONTENT_LENGTH': '113',
 'CONTENT_TYPE': 'application/xml; charset="utf-8"',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_LANGUAGE': 'en-us, en;q=0.9',
 'HTTP_AUTHORIZATION': 'Basic **masked**',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'close',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': 'localhost:5232',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Evolution/3.26.2.1',
 'HTTP_X_FORWARDED_FOR': '192.168.1.29',
 'HTTP_X_REMOTE_USER': 'daniel',
 'HTTP_X_SCRIPT_NAME': '/radicale',
 'PATH_INFO': '/daniel/addressbook.vcf/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_CERTIFICATE': {'issuer': ((('countryName', 'DE'),),
                                   (('stateOrProvinceName', 'Some-State'),),
                                   (('organizationName',
                                     '...removed...'),)),
                        'notAfter': 'Feb  5 17:03:08 2045 GMT',
                        'notBefore': 'Sep 21 17:03:08 2017 GMT',
                        'serialNumber': '...removed...',
                        'subject': ((('countryName', 'DE'),),
                                    (('stateOrProvinceName', 'Some-State'),),
                                    (('organizationName',
                                      '...removed...'),)),
                        'version': 3},
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'localhost.localdomain',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SOFTWARE': 'WSGIServer/0.2',
 'wsgi.errors': <_io.StringIO object at 0x75bd1120>,
 'wsgi.file_wrapper': <class 'wsgiref.util.FileWrapper'>,
 'wsgi.input': <_io.BufferedReader name=7>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2017-11-28 12:44:50,135 - [745ff460] DEBUG: Script name overwritten by client: '/radicale'
2017-11-28 12:44:50,139 - [745ff460] DEBUG: Sanitized script name: '/radicale'
2017-11-28 12:44:50,143 - [745ff460] DEBUG: Sanitized path: '/daniel/addressbook.vcf/'
2017-11-28 12:44:50,147 - [745ff460] INFO: Successful login: 'daniel'
2017-11-28 12:44:50,174 - [745ff460] DEBUG: Request content:
<?xml version="1.0"?>
<propfind xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <prop>
    <CS:getctag />
  </prop>
</propfind>

2017-11-28 12:44:50,196 - [745ff460] DEBUG: 'daniel' has read and write access to collection 'daniel/addressbook.vcf'
2017-11-28 12:44:50,649 - [745ff460] DEBUG: Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/radicale/daniel/addressbook.vcf/</href>
    <propstat>
      <prop>
        <CS:getctag>"9c83a9678ca24a769314bf013a3ceaca"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

2017-11-28 12:44:50,662 - [745ff460] INFO: PROPFIND response status for '/daniel/addressbook.vcf/' with depth '0' in 0.594 seconds: 207 Multi-Status
2017-11-28 12:44:50,740 - [745ff460] INFO: PROPFIND request for '/daniel/addressbook.vcf/' with depth '0' received from '192.168.1.29' (forwarded by 127.0.0.1) using 'Evolution/3.26.2.1'
2017-11-28 12:44:50,803 - [745ff460] DEBUG: Request headers:
{'CONTENT_LENGTH': '113',
 'CONTENT_TYPE': 'application/xml; charset="utf-8"',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT_LANGUAGE': 'en-us, en;q=0.9',
 'HTTP_AUTHORIZATION': 'Basic **masked**',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'close',
 'HTTP_DEPTH': '0',
 'HTTP_HOST': 'localhost:5232',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_USER_AGENT': 'Evolution/3.26.2.1',
 'HTTP_X_FORWARDED_FOR': '192.168.1.29',
 'HTTP_X_REMOTE_USER': 'daniel',
 'HTTP_X_SCRIPT_NAME': '/radicale',
 'PATH_INFO': '/daniel/addressbook.vcf/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_CERTIFICATE': {'issuer': ((('countryName', 'DE'),),
                                   (('stateOrProvinceName', 'Some-State'),),
                                   (('organizationName',
                                     '...removed...'),)),
                        'notAfter': 'Feb  5 17:03:08 2045 GMT',
                        'notBefore': 'Sep 21 17:03:08 2017 GMT',
                        'serialNumber': '...removed...',
                        'subject': ((('countryName', 'DE'),),
                                    (('stateOrProvinceName', 'Some-State'),),
                                    (('organizationName',
                                      '...removed...'),)),
                        'version': 3},
 'REMOTE_HOST': '',
 'REQUEST_METHOD': 'PROPFIND',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'localhost.localdomain',
 'SERVER_PORT': '5232',
 'SERVER_PROTOCOL': 'HTTP/1.0',
 'SERVER_SOFTWARE': 'WSGIServer/0.2',
 'wsgi.errors': <_io.StringIO object at 0x75bd1120>,
 'wsgi.file_wrapper': <class 'wsgiref.util.FileWrapper'>,
 'wsgi.input': <_io.BufferedReader name=7>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}
2017-11-28 12:44:50,807 - [745ff460] DEBUG: Script name overwritten by client: '/radicale'
2017-11-28 12:44:50,811 - [745ff460] DEBUG: Sanitized script name: '/radicale'
2017-11-28 12:44:50,815 - [745ff460] DEBUG: Sanitized path: '/daniel/addressbook.vcf/'
2017-11-28 12:44:50,819 - [745ff460] INFO: Successful login: 'daniel'
2017-11-28 12:44:50,846 - [745ff460] DEBUG: Request content:
<?xml version="1.0"?>
<propfind xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <prop>
    <CS:getctag />
  </prop>
</propfind>

2017-11-28 12:44:50,868 - [745ff460] DEBUG: 'daniel' has read and write access to collection 'daniel/addressbook.vcf'
2017-11-28 12:44:51,320 - [745ff460] DEBUG: Response content:
<?xml version="1.0"?>
<multistatus xmlns="DAV:" xmlns:CS="http://calendarserver.org/ns/">
  <response>
    <href>/radicale/daniel/addressbook.vcf/</href>
    <propstat>
      <prop>
        <CS:getctag>"9c83a9678ca24a769314bf013a3ceaca"</CS:getctag>
      </prop>
      <status>HTTP/1.1 200 OK</status>
    </propstat>
  </response>
</multistatus>

2017-11-28 12:44:51,332 - [745ff460] INFO: PROPFIND response status for '/daniel/addressbook.vcf/' with depth '0' in 0.592 seconds: 207 Multi-Status
tiiiecherle commented 6 years ago

Facing the same error. radicale[806]: [692bee715700] ERROR: An exception occurred during request: 'NoneType' object has no attribute 'split'

Setup is archlinux, all packages up-to-date. nginx as reverse proxy and secured connection.

The error appears around once or twice a day (5-10 clients, all ios and macos) and I don`t know how to reproduce it.

rgenoud commented 6 years ago

Hi, I'm also facing the same error, but I can reproduce it every time ! I imported my agendas from google agenda into radicale, and each time I want to modify an event (with agendav) I get this error. I attached the debug trace with the Traceback trace_radicale.log

NB: I tried to do the same thing with davdroid, and there's no problem. So it seems that Agendav send something that radicale does't like.

chripo commented 6 years ago

is it possible to upgrade the python version to 3.5 or even 3.6?

rgenoud commented 6 years ago

Well, not easily, since it's on an OpenMediaVault machine (based on debian 8) But I could try to reinstall radicale/agendac on a debian 9 VM if that's necessary

chripo commented 6 years ago

@rgenoud what is your setup?

rgenoud commented 6 years ago

@chripo The machine is an openmediavault distro which is based on debian jessie (8). I installed radicale from git :

printf 'radicale:x:120:125:Radicale CalDAV server,,,:/var/lib/radicale:/bin/false\n' >> /etc/passwd
printf 'radicale:*:17596:0:99999:7:::' >> /etc/shadow
mkdir /var/lib/radicale
chown -R radicale:radical /var/lib/radicale
git clone https://github.com/Kozea/Radicale.git
cd Radicale
git checkout 2.1.8
sudo python3 -m pip install --upgrade .
mkdir -p /usr/local/etc/radicale/
cp config logging /usr/local/etc/radicale/

debian 8 python3 version is:

python3 --version
Python 3.4.2

For agendav, I used v2.2.0.

debian 8 php version is :

php --version
PHP 5.6.33-0+deb8u1 (cli) (built: Jan  5 2018 15:46:26) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
balrok commented 6 years ago

I get the same error (seldomly):

python3 --version
Python 3.5.3

radicale --version
2.1.8
pierredGitHub commented 6 years ago

I have the same error. I am using Radicale 2.1.9 with Python 3.6 on Windows 10. Using it to sync contacts only, not events. I have 3 clients: Thunderbird with the CardBook add-on, a BlackBerry 10 phone (running 10.3.3, and an iPhone running iOS 11.4.1. Everything seems to be working ok, but I have those errors in the log.

pierredGitHub commented 6 years ago

Any news on the meaning of this error?

AddoSolutions commented 6 years ago

I have this error as well, I am only running MacOS High Sierra Calendar and Contacts (contacts which isn't working).

FROM alpine:3.8 (docker)

/ # python3 --version
Python 3.6.6
/ # radicale --version
2.1.10
jakechenTW commented 5 years ago

Encountering the same error as well, running radicale behind nginx through reverse proxy.

Python 3.5.1 radicale 2.1.0

In my case, this error seems to be caused by a broken pipe which happens when the request took radicale too long to respond, possibly related to connection timeout setting in both radicale and nginx.

Traceback (most recent call last): File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 138, in run self.finish_response() File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response self.write(data) File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 274, in write self.send_headers() File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 332, in send_headers self.send_preamble() File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 453, in _write self.stdout.write(data) File "/volume1/@appstore/py3k/usr/local/lib/python3.5/socket.py", line 593, in write return self._sock.send(b) BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 141, in run self.handle_error() File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 368, in handle_error self.finish_response() File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 180, in finish_response self.write(data) File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 274, in write self.send_headers() File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 331, in send_headers if not self.origin_server or self.client_is_modern(): File "/volume1/@appstore/py3k/usr/local/lib/python3.5/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 "/volume1/@appstore/py3k/usr/local/lib/python3.5/socketserver.py", line 628, in process_request_thread self.finish_request(request, client_address) File "/volume1/@appstore/py3k/usr/local/lib/python3.5/socketserver.py", line 357, in finish_request self.RequestHandlerClass(request, client_address, self) File "/var/packages/Contacts/target/radicale/venv/lib/python3.5/site-packages/radicale/init.py", line 222, in init super().init(*args, **kwargs) File "/volume1/@appstore/py3k/usr/local/lib/python3.5/socketserver.py", line 684, in init self.handle() File "/var/packages/Contacts/target/radicale/venv/lib/python3.5/site-packages/radicale/init.py", line 241, in handle super().handle() File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/simple_server.py", line 133, in handle handler.run(self.server.get_app()) File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/handlers.py", line 144, in run self.close() File "/volume1/@appstore/py3k/usr/local/lib/python3.5/wsgiref/simple_server.py", line 35, in close self.status.split(' ',1)[0], self.bytes_sent AttributeError: 'NoneType' object has no attribute 'split'

fabacab commented 5 years ago

I just faced what might be the same issue and I was able to isolate it to the client disconnecting (timing out) before Radicale was able to send a response. In my case, the cause was a very large collection (3,400+ items in a single CardDAV collection) coupled with a client (Thunderbird CardBook) that was issuing a WebDAV PROPFIND request for the entire collection. This resulted in Radicale iterating over every single item in the collection, writing its multistatus response, which took longer than the timeout set in the client (120 seconds, in my case, the CardBook default). Doubling the timeout in CardBook's preferences to a value of 240 seconds (CardBook Preferences → Sync → Timeout) fixed the issue.

I hope this helps someone. The real solution for CardBook users is of course to patch CardBook so it doesn't request such a large response, and it might be nice for Radicale users if Radicale noticed a disconnected client and wrote a more helpful error message in the event the client seems to be disappeared. But either way, don't forget to check your client's settings, as well. :)

captn3m0 commented 5 years ago

Syncing with vdirsycner seems to have the same issue. I had to increase the available memory from 128MB to 512MB for it to work.

pierredGitHub commented 5 years ago

I am not using vdirsyncer. Does increasing the memory still apply to Radicale? If so how? Thanks.

captn3m0 commented 5 years ago

I run my services using Docker, and docker gave me a Out of Memory alert on radicale:

[69962.656870] radicale invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
[69962.656872] CPU: 0 PID: 19783 Comm: radicale Tainted: P           OE     5.1.14-arch1-1-ARCH #1
[69962.656994] [   2872]  2999  2872    36050    15534   327680        0             0 radicale
[69962.657114] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=1f0fec62bff456f5d3604aac1bfddfda2a7649b38335800d85d80159252e57d9,mems_allowed=0,oom_memcg=/docker/1f0fec62bff456f5d3604aac1bfddfda2a7649b38335800d85d80159252e57d9,task_memcg=/docker/1f0fec62bff456f5d3604aac1bfddfda2a7649b38335800d85d80159252e57d9,task=radicale,pid=2872,uid=2999
[69962.657121] Memory cgroup out of memory: Killed process 2872 (radicale) total-vm:144200kB, anon-rss:60832kB, file-rss:1304kB, shmem-rss:0kB
[69962.661014] oom_reaper: reaped process 2872 (radicale), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB

I'm assuming that the root cause is the same (radicale taking too long for PROPFIND command that vdirsyncer issues). @aimin73's comment above recommended looking at timeouts, but increasing memory limits helped in my case.

tiiiecherle commented 5 years ago

How exactly with which setting in which file is it possible to increase the available memory for radicale if running without docker and without vdirsyncer? Thanks in advance.

captn3m0 commented 5 years ago

without docker, it would depend on what method you are using. Increasing memory only works if your radicale instance is dying because of a memory issue.

Otherwise, you should increase timeouts at your client.

pierredGitHub commented 5 years ago

@Nemo,

One of my Radicale clients is CardBook in Thunderbird, and there is a timeout that can be increased, which I did.

However my other Radicale client is an iPhone, and there is no setting that I am aware of to increase the timeout to sync contacts. There is no setting either as to how often the iPhone syncs contacts. One can pull down the contact list from the top and that forces a sync, but that's about all you can control as to when it syncs.

Any ideas for the iPhone (running 12.3.1)?

tiiiecherle commented 5 years ago

I´m using macOS and iOS clients. As far as I know both do not have timeout options. Radicale is running without docker and without vdirsyncer. What options do I have to fix the issue or will I have to wait for an update? Thanks

pierredGitHub commented 5 years ago

@tiiiecherle,

I agree that iOS has no timeout options (that I am aware of). However on macOS, you must be using some kind of client, no? That client may have a timeout option. Are you syncing calendar entries or contacts? I am using CardBook in Thunderbird (to sync contacts) on Windows and macOS and it has a timeout option, which I increased.

tiiiecherle commented 5 years ago

@pierredGitHub I use the standard onboard apps on macOS to sync contacts, calendars and reminders. I don't know about any timeout options for them.

damionx7 commented 4 years ago

is this issue resolved ?

pierredGitHub commented 4 years ago

I have not been paying attention to it in the past 6 months because I moved my Radicale server from my everyday machine to another. So I just looked at the current log window and did not see the error message. Admittedly I had increased the timeout settings in my contacts app (CardBook in Thunderbird) several months ago.

Re the iPhone (and now iPad as well) there is no timeout setting. But I have seen several iOS updates in the past few months, the main one being the upgrade to iOS 13 (and iPadOS 13). So it is possible Apple changed something on that front. Who knows.

All that being said, my log contains another error (5 times) that I had not seen before, and that is:

ERROR: An exception occurred during request: SSL handshake failed: EOF occurred in violation of protocol (_ssl.c:777)

The Win10 machine in question has been running for 12 days without a reboot. But I don't know when the 5 errors occurred (the console windows does not have timestamps, it should IMHO).

Pierre

isgroup commented 4 years ago

I don't think it's solved, just got it today in a fresh PIP installation (python3 -m pip install --upgrade radicale):

[2020-09-09 02:01:30 +0200] [23767/Thread-2781] [ERROR] An exception occurred during request: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 138, in run
    self.finish_response()
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 181, in finish_response
    self.finish_content()
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 310, in finish_content
    self.send_headers()
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 332, in send_headers
    self.send_preamble()
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 255, in send_preamble
    ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 453, in _write
    result = self.stdout.write(data)
  File "/usr/lib/python3.6/socketserver.py", line 803, in write
    self._sock.sendall(b)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 141, in run
    self.handle_error()
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 368, in handle_error
    self.finish_response()
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 180, in finish_response
    self.write(data)
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 274, in write
    self.send_headers()
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 331, in send_headers
    if not self.origin_server or self.client_is_modern():
  File "/usr/lib/python3.6/wsgiref/handlers.py", line 344, in client_is_modern
    return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable

This is while syncing a large number of contacts using the Thunderbird extension CardBook.

If you need more info feel free to ask!

isgroup commented 4 years ago

As @pierredGitHub said ("Admittedly I had increased the timeout settings in my contacts app (CardBook in Thunderbird) several months ago.") setting the timeout value to an arbitrary high value really improves the situation.

My speculation is that wsgiref does not like when a client timeout the socket leading to an unexpected condition. Additionally the error is not handled in a descriptive manner.

A mitigating factor is that this error happens in a Thread and the service continues to operate.

I don't know if this has some impact on data integrity or if the contact data has been sent, received, processed and stored correctly and simply fails to progress to the next contact.

vuntz commented 3 years ago

I've been hitting this with 3.0.6, and this happens while Radicale is busy caching all the items. Once the caching is done, this doesn't happen anymore.

Tom866 commented 3 years ago

Hi also have this issue. I could not recreate it with a minimal example with the multifilesystem storage backend, but it does happen with the radicale_storage_decsync storage plugin. See https://github.com/39aldo39/Radicale-DecSync/issues/8 :

[2021-01-12 13:06:14 +0100] [16224/Thread-21] [ERROR] An exception occurred during PUT request on '/randomusername/contacts-random_string_of_characters/random_string_of_characters.vcf': 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
  File "c:\users\my_windows_user_name\anaconda3\lib\site-packages\radicale\app\__init__.py", line 105, in __call__
    status, headers, answers = self._handle_request(environ)
  File "c:\users\my_windows_user_name\anaconda3\lib\site-packages\radicale\app\__init__.py", line 276, in _handle_request
    status, headers, answer = function(
  File "c:\users\my_windows_user_name\anaconda3\lib\site-packages\radicale\app\put.py", line 210, in do_PUT
    etag = parent_item.upload(href, prepared_item).etag
  File "c:\users\my_windows_user_name\anaconda3\lib\site-packages\radicale_storage_decsync\__init__.py", line 99, in upload
    supported_components = self.get_meta("C:supported-calendar-component-set").split(",")
AttributeError: 'NoneType' object has no attribute 'split'

I understand you are not affiliated with the storage plugin I use, but thought I could mention it anyway. If I manage to recreate the problem without the DecSync plugin I will let you know here.

I am using windows 10 20H2 Python 3.8.3 (although in a conda environment) Radicale 3.0.6 radicale_storage_decsync 1.2.0 Thunderbird 78.6.1 with the CardBook extension

russ1217 commented 2 years ago

[2022-05-03 22:16:52 +0800] [3200/Thread-89] [ERROR] An exception occurred during request: 'NoneType' object has no attribute 'split'

it seems that this issue has not been solved after almost 5 years. I had it too.

Python 3.5.3 radicale --version 3.0.6 Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

Only three client machines with DavX5 (android) Evolution (Manjaro Linux) and OutlookCalDavSynchronizer-4.0 (Windows 10 with MS-Outlook)

pbiering commented 1 month ago

if reproducable with current version without any 3rd party plugins, please reopen