ntfd icon indicating copy to clipboard operation
ntfd copied to clipboard

IOERROR

Open x-45 opened this issue 4 years ago • 10 comments

using the config provided on github prevents the start up of ntfd with the error Failed to read config file: hGetContents: invalid argument (invalid byte sequence)

x-45 avatar Dec 09 '20 10:12 x-45

Check what encoding you're using for the config file, it has to be UTF-8

kamek-pf avatar Dec 09 '20 20:12 kamek-pf

It is indeed UTF-8

x-45 avatar Dec 09 '20 21:12 x-45

I'm not sure then, I can't reproduce :( Did you compile yourself ? Or a you using the binary from the release page ?

kamek-pf avatar Dec 09 '20 21:12 kamek-pf

I used the binary provided in the AUR.

x-45 avatar Dec 10 '20 04:12 x-45

I still believe this is an encoding issue, are you using special characters (anything non ascii) in your config file ?

The way I'm parsing config files might be flawed '_'

kamek-pf avatar Dec 13 '20 00:12 kamek-pf

Could also be caused by the default encoding, could you paste the output of the locale command ?

kamek-pf avatar Dec 13 '20 00:12 kamek-pf

I am using en_AU.UTF-8

x-45 avatar Dec 13 '20 01:12 x-45

I am having the same problem I think, it says the same error if I run ntfd &, but it also says that the The name io.ntfd was not provided by any .service files It could be an issue with the config files but I doubt it, I changed nearly nothing:

[openweathermap]
enabled = true

api_key = "file:~/.config/ntfd/openweathermap.txt"

city_id = "2756253"

notification_timeout = 10

notification_body = "Expected within the next 3 hours"

sync_frequency = 1800 # 30 minutes

display = "{{ temp_icon }} {{ temp_celsius }}°C {{ trend }} {{ forecast_icon }} {{ forecast_celsius }}°C"

Adelaide-b avatar Jan 06 '21 02:01 Adelaide-b

Okay, I found that changing the locale through: $ localectl set-locale LANG=en_US.UTF-8 happened to fix the issue, thanks!

Adelaide-b avatar Jan 06 '21 10:01 Adelaide-b

interestingly, I had the same problem but the fix didn't work on my end.

EysseW avatar Feb 20 '22 20:02 EysseW