You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I know that Windows isn't officially supported.
I am writing this in case you can trivially fix this.
Along the way I have discovered 2 other issues which seem trivial and you might benefit in solving anyway.
I have installed khal with pipx. I did the same with vdirsyncer. I configured both of them correctly. I am using both programs in linux so I tried my luck with Windows too.
I discovered 3 issues. I was able to hack around 2 of them. For the 3rd one I have no idea what is happening or how to solve it.
Issue 1
After a clean install ikhal will try to create the sqlite3 database at the default place. Namely, on Windows, C:\Users\<username>\.local\share\khal\khal.db. However, the last part of the path, khal.db, is created as a folder instead of as a file.
Current solution: Set ~/.local/share/khal/khal.db in the config. (the tilde vs the full path probably doesn't matter).
Issue 2
During startup, ikhal tries to figure out if the local calendar is modified and ends up in this code:
The constant os.O_DIRECTORY isn't available on Windows and the program crashes.
Secondly, I tried to understand the logic of the function and it doesn't make sense in the context of a vdir calendar. The f variable wll point to a directory. On Windows, you can't os.open() a directory. It fails with PermissionError: [Errno 13] Permission denied:.
So I slightly changed the function to get it working with this diff:
index 2b3e688..07e75a3 100644
--- a/khal/khalendar/vdir.py+++ b/khal/khalendar/vdir.py@@ -71,18 +71,18 @@ def get_etag_from_file(f) -> str:
if hasattr(f, 'read'):
f.flush()
f = f.fileno()
- elif isinstance(f, str):- flags = 0- if os.path.isdir(f):- flags = os.O_DIRECTORY- f = os.open(f, flags)- close_f = True+ # elif isinstance(f, str):+ # flags = 0+ # if os.path.isdir(f):+ # flags = os.O_DIRECTORY+ # f = os.open(f, flags)+ # close_f = True
# assure that all internal buffers associated with this file are
# written to disk
try:
- os.fsync(f)- stat = os.fstat(f)+ # os.fsync(f)+ stat = os.stat(f)
finally:
if close_f:
os.close(f)
Issue 3
Finally, ikhal can now start. But the display is totally corrupted. Take a look at the attached screenshot.
Keep in mind, that I run a non-english Windows version (greek locale).
The display is corrupted both in cmd and in bash (from git for windows). Both are integrated in Terminal.
In bash, LANG is exported as en_GB.UTF-8.
OS, version, khal version and how you installed it:
The output of khal --version: 0.11.3
Installation method: pipx
python version: 3.11.2
OS: Windows 10
The text was updated successfully, but these errors were encountered:
Describe the bug
I know that Windows isn't officially supported.
I am writing this in case you can trivially fix this.
Along the way I have discovered 2 other issues which seem trivial and you might benefit in solving anyway.
I have installed khal with
pipx
. I did the same withvdirsyncer
. I configured both of them correctly. I am using both programs in linux so I tried my luck with Windows too.I discovered 3 issues. I was able to hack around 2 of them. For the 3rd one I have no idea what is happening or how to solve it.
Issue 1
After a clean install
ikhal
will try to create the sqlite3 database at the default place. Namely, on Windows,C:\Users\<username>\.local\share\khal\khal.db
. However, the last part of the path,khal.db
, is created as a folder instead of as a file.Current solution: Set
~/.local/share/khal/khal.db
in the config. (the tilde vs the full path probably doesn't matter).Issue 2
During startup,
ikhal
tries to figure out if the local calendar is modified and ends up in this code:khal/khal/khalendar/vdir.py
Lines 74 to 79 in 106e4d0
The constant
os.O_DIRECTORY
isn't available on Windows and the program crashes.Secondly, I tried to understand the logic of the function and it doesn't make sense in the context of a vdir calendar. The
f
variable wll point to a directory. On Windows, you can'tos.open()
a directory. It fails withPermissionError: [Errno 13] Permission denied:
.So I slightly changed the function to get it working with this diff:
Issue 3
Finally,
ikhal
can now start. But the display is totally corrupted. Take a look at the attached screenshot.Keep in mind, that I run a non-english Windows version (greek locale).
The display is corrupted both in
cmd
and inbash
(from git for windows). Both are integrated in Terminal.In bash,
LANG
is exported asen_GB.UTF-8
.OS, version, khal version and how you installed it:
The text was updated successfully, but these errors were encountered: