Skip to content

Unable to connect :  #158

Description

@Sigmun

When I tried to connect to my nextcloud server on an OVH Web Host, I get the following error:

>>> client.principal()
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\urllib3\response.py in _update_chunk_length(self)
    696         try:
--> 697             self.chunk_left = int(line, 16)
    698         except ValueError:

ValueError: invalid literal for int() with base 16: b''

During handling of the above exception, another exception occurred:

InvalidChunkLength                        Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\urllib3\response.py in _error_catcher(self)
    437             try:
--> 438                 yield
    439

C:\ProgramData\Anaconda3\lib\site-packages\urllib3\response.py in read_chunked(self, amt, decode_content)
    763             while True:
--> 764                 self._update_chunk_length()
    765                 if self.chunk_left == 0:

C:\ProgramData\Anaconda3\lib\site-packages\urllib3\response.py in _update_chunk_length(self)
    700             self.close()
--> 701             raise InvalidChunkLength(self, line)
    702

InvalidChunkLength: InvalidChunkLength(got length b'', 0 bytes read)

During handling of the above exception, another exception occurred:

ProtocolError                             Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\requests\models.py in generate()
    757                 try:
--> 758                     for chunk in self.raw.stream(chunk_size, decode_content=True):
    759                         yield chunk

C:\ProgramData\Anaconda3\lib\site-packages\urllib3\response.py in stream(self, amt, decode_content)
    571         if self.chunked and self.supports_chunked_reads():
--> 572             for line in self.read_chunked(amt, decode_content=decode_content):
    573                 yield line

C:\ProgramData\Anaconda3\lib\site-packages\urllib3\response.py in read_chunked(self, amt, decode_content)
    792             if self._original_response:
--> 793                 self._original_response.close()
    794

C:\ProgramData\Anaconda3\lib\contextlib.py in __exit__(self, typ, value, traceback)
    136             try:
--> 137                 self.gen.throw(typ, value, traceback)
    138             except StopIteration as exc:

C:\ProgramData\Anaconda3\lib\site-packages\urllib3\response.py in _error_catcher(self)
    454                 # This includes IncompleteRead.
--> 455                 raise ProtocolError("Connection broken: %r" % e, e)
    456

ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

During handling of the above exception, another exception occurred:

ChunkedEncodingError                      Traceback (most recent call last)
<ipython-input-8-a6f62e4f6479> in <module>
----> 1 client.principal()

C:\ProgramData\Anaconda3\lib\site-packages\caldav\davclient.py in principal(self, *largs, **kwargs)
    337         """
    338         if not self._principal:
--> 339             self._principal = Principal(client=self, *largs, **kwargs)
    340         return self._principal
    341

C:\ProgramData\Anaconda3\lib\site-packages\caldav\objects.py in __init__(self, client, url)
    386         if url is None:
    387             self.url = self.client.url
--> 388             cup = self.get_property(dav.CurrentUserPrincipal())
    389             self.url = self.client.url.join(
    390                 URL.objectify(cup))

C:\ProgramData\Anaconda3\lib\site-packages\caldav\objects.py in get_property(self, prop, use_cached, **passthrough)
    168             if prop.tag in self.props:
    169                 return self.props[prop.tag]
--> 170         foo = self.get_properties([prop], **passthrough)
    171         return foo.get(prop.tag, None)
    172

C:\ProgramData\Anaconda3\lib\site-packages\caldav\objects.py in get_properties(self, props, depth, parse_response_xml, parse_props)
    191         """
    192         rc = None
--> 193         response = self._query_properties(props, depth)
    194         if not parse_response_xml:
    195             return response

C:\ProgramData\Anaconda3\lib\site-packages\caldav\objects.py in _query_properties(self, props, depth)
    135             root = dav.Propfind() + prop
    136
--> 137         return self._query(root, depth)
    138
    139     def _query(self, root=None, depth=0, query_method='propfind', url=None,

C:\ProgramData\Anaconda3\lib\site-packages\caldav\objects.py in _query(self, root, depth, query_method, url, expected_return_value)
    153         if url is None:
    154             url = self.url
--> 155         ret = getattr(self.client, query_method)(
    156             url, body, depth)
    157         if ret.status == 404:

C:\ProgramData\Anaconda3\lib\site-packages\caldav\davclient.py in propfind(self, url, props, depth)
    372          * DAVResponse
    373         """
--> 374         return self.request(url or self.url, "PROPFIND", props,
    375                             {'Depth': str(depth)})
    376

C:\ProgramData\Anaconda3\lib\site-packages\caldav\davclient.py in request(self, url, method, body, headers)
    493             auth = self.auth
    494
--> 495         r = self.session.request(
    496             method, url, data=to_wire(body),
    497             headers=combined_headers, proxies=proxies, auth=auth,

C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
    540         }
    541         send_kwargs.update(settings)
--> 542         resp = self.send(prep, **send_kwargs)
    543
    544         return resp

C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py in send(self, request, **kwargs)
    695
    696         if not stream:
--> 697             r.content
    698
    699         return r

C:\ProgramData\Anaconda3\lib\site-packages\requests\models.py in content(self)
    834                 self._content = None
    835             else:
--> 836                 self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
    837
    838         self._content_consumed = True

C:\ProgramData\Anaconda3\lib\site-packages\requests\models.py in generate()
    759                         yield chunk
    760                 except ProtocolError as e:
--> 761                     raise ChunkedEncodingError(e)
    762                 except DecodeError as e:
    763                     raise ContentDecodingError(e)

ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

This calendar is correctly set up on thunderbird or DavX5.

Any idea? Is it my server configuration? or OVH?

Metadata

Metadata

Assignees

No one assigned

    Labels

    need-feedbackNothing will be done without more info/feedback from someone that can reproduce the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions