Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to sync with calcurse-caldav! "https" appended to hostname for no reason #498

Open
connor5043 opened this issue Nov 29, 2024 · 0 comments

Comments

@connor5043
Copy link

Version information. Calcurse 4.8.1, Httplib2 0.22.0

Bug description. When I run calcurse-caldav --init=keep-local I get the following error:

Connecting to [redacted].com...
Removing all objects from the CalDAV server...
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1343, in _conn_request
    conn.connect()
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1119, in connect
    address_info = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/socket.py", line 962, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/calcurse-caldav", line 762, in <module>
    remote_wipe(conn)
  File "/usr/bin/calcurse-caldav", line 375, in remote_wipe
    remove_remote_object(conn, remote_items[href], href)
  File "/usr/bin/calcurse-caldav", line 459, in remove_remote_object
    remote_query(conn, "DELETE", hostname_uri + href, headers, None)
  File "/usr/bin/calcurse-caldav", line 306, in remote_query
    resp, body = conn.request(path, cmd, body=body, headers=headers)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1701, in request
    (response, content) = self._request(
                          ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1421, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1350, in _conn_request
    raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
httplib2.error.ServerNotFoundError: Unable to find the server at [redacted].comhttps

As you can see, https has been appended to the hostname for no reason. calcurse-caldav --init=keep-remote works: although it says "Failed to import object" for all of the objects, all of them do get imported.

Reproduce. Install calcurse. Run it once, make an event for example. Make a simple config file in ~/.config/calcurse/caldav/config:

[General]
Binary = calcurse
Hostname = [redacted].com
Path = /[redacted]/[redacted]/[redacted]/[redacted]/
AuthMethod = basic
InsecureSSL = No
HTTPS = Yes
SyncFilter = cal
DryRun = No
Verbose = Yes

[Auth]
Username = [redacted]
Password = [redacted]

Run calcurse-caldav --init=keep-local. Get error

Expected Behavior. Expected to put events from local calcurse calendar into CalDAV calendar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant