Skip to content

The aiohttp change with storage/dav/http #916

@dilyanpalauzov

Description

@dilyanpalauzov

With python 3.8.8+ and
aiohttp 3.7.4.post0
aiostream 0.4.3

I install vdirsyncer, version 0.18.1.dev44+g98fcd12. With this config file:

[general]
status_path = "status"

[pair google_download]
# From Google to the local file system
a = "google_remote"
b = "google_local"
collections = null
conflict_resolution = "a wins"

[storage google_remote]
type = "http"
url = "https://calendar.google.com/calendar/ical/aegee.eu_v5mn651imeqpvs87v4ln7hr1f4%40group.calendar.google.com/public/basic.ics"

[storage google_local]
type = "filesystem"
path = "google_local"
fileext = ".ics"

I call:

vdirsyncer -c config discover
google_remote:
google_local:
warning: Directory google_local does not exist.
warning: No collection null found for storage google_local.
Should vdirsyncer attempt to create it? [y/N]: y
Saved for google_download: collections = null


vdirsyncer -c config metasync
Metasyncing google_download

vdirsyncer -c config -vdebug sync
Syncing google_download
debug: ====================
debug: GET https://calendar.google.com/calendar/ical/aegee.eu_v5mn651imeqpvs87v4ln7hr1f4%40group.calendar.google.com/public/basic.ics
debug: {'User-Agent': 'vdirsyncer/0.18.1.dev44+g98fcd12'}
debug: None
debug: Sending request...
error: Unknown error occurred for google_download: tuple index out of range
error: Use `-vdebug` to see the full traceback.
debug:   File "/usr/local/lib/python3.8/site-packages/vdirsyncer-0.18.1.dev44+g98fcd12-py3.8.egg/vdirsyncer/cli/tasks.py", line 72, in sync_collection
debug:     await sync.sync(
debug:   File "/usr/local/lib/python3.8/site-packages/vdirsyncer-0.18.1.dev44+g98fcd12-py3.8.egg/vdirsyncer/sync/__init__.py", line 144, in sync
debug:     a_nonempty = await a_info.prepare_new_status()
debug:   File "/usr/local/lib/python3.8/site-packages/vdirsyncer-0.18.1.dev44+g98fcd12-py3.8.egg/vdirsyncer/sync/__init__.py", line 48, in prepare_new_status
debug:     async for href, etag in self.storage.list():
debug:   File "/usr/local/lib/python3.8/site-packages/vdirsyncer-0.18.1.dev44+g98fcd12-py3.8.egg/vdirsyncer/storage/http.py", line 68, in list
debug:     r = await request(
debug:   File "/usr/local/lib/python3.8/site-packages/vdirsyncer-0.18.1.dev44+g98fcd12-py3.8.egg/vdirsyncer/http.py", line 149, in request
debug:     r = await r
debug:   File "/usr/local/lib/python3.8/site-packages/aiohttp-3.7.4.post0-py3.8-linux-x86_64.egg/aiohttp/client.py", line 520, in _request
debug:     conn = await self._connector.connect(
debug:   File "/usr/local/lib/python3.8/site-packages/aiohttp-3.7.4.post0-py3.8-linux-x86_64.egg/aiohttp/connector.py", line 535, in connect
debug:     proto = await self._create_connection(req, traces, timeout)
debug:   File "/usr/local/lib/python3.8/site-packages/aiohttp-3.7.4.post0-py3.8-linux-x86_64.egg/aiohttp/connector.py", line 892, in _create_connection
debug:     _, proto = await self._create_direct_connection(req, traces, timeout)
debug:   File "/usr/local/lib/python3.8/site-packages/aiohttp-3.7.4.post0-py3.8-linux-x86_64.egg/aiohttp/connector.py", line 999, in _create_direct_connection
debug:     hosts = await asyncio.shield(host_resolved)
debug:   File "/usr/local/lib/python3.8/site-packages/aiohttp-3.7.4.post0-py3.8-linux-x86_64.egg/aiohttp/connector.py", line 865, in _resolve_host
debug:     addrs = await self._resolver.resolve(host, port, family=self._family)
debug:   File "/usr/local/lib/python3.8/site-packages/aiohttp-3.7.4.post0-py3.8-linux-x86_64.egg/aiohttp/resolver.py", line 41, in resolve
debug:     if family == socket.AF_INET6 and address[3]:  # type: ignore

However, if I try the same on a different computer with python 3.9.6, again with

aiohttp                       3.7.4.post0
aiostream                     0.4.3

There is no such error, with the same vdirsyncer code (0.18.1.dev44+g98fcd12).

My understanding is, that vdirsyncer is supposed to work under python 3.8.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions