-
Notifications
You must be signed in to change notification settings - Fork 1
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
Error reading template file #22
Comments
Can you check if the yaml file is encoded as UTF-8? Could you provide the yaml file? |
I simply copy and pasted in from the example so i could understand it better. VSCode says its UTF-8 in the bottom right and i trust it. Note - the error (when i attempted to debug it) appears to be coming from this line template = Template(file.read()) in the template_renderer.py class (again not a py dev) Below is a copy paste of my yaml from the example.
|
Interesting. Can you try one of the other yaml files from the collection? I'll be pushing an update this week that will improve the way the yaml files are read among other things. I'll see if I can replicate this once im back at home. |
Im afraid I only see end products on the link you provided. I see only html files and no yaml files - apologies if I am misunderstanding! |
You are entirely correct. My bad. I need to update that repo. Here is one: https://github.com/rtuszik/KoalaKeys/blob/a6a2eb3e768f904eebf8bf202db20cb8819904c0/cheatsheets/ipad.yaml |
Same error with that one - I don't believe the code is getting to the point where its reading the yaml files. I believe the copy of the cheatsheet_template.html contains some character that the newest version of the requirements.txt or python is unable to parse. (this is my guess). 2024-11-07 12:32:46,799 - app - ERROR - Error reading template file: 'charmap' codec can't decode byte 0x90 in position 17317: character maps to |
I haven't been able to reproduce the issue, but I have streamlined some of the logic with regards to opening yaml. Could you try again using the yaml branch? https://github.com/rtuszik/KoalaKeys/tree/yaml |
This is the result - no output.
|
Im pretty sure I have found the issue. I don't specify UTF-8 encoding when writing to html. I assume that this is an issue with windows not defaulting to UTF-8. Windows uses cp1252 encoding. I will fix this once I am at my desk in a few hours. |
Great! |
Sweet, I haven't made the move to a split keyboard yet, but im sure I will soon. Could you try again with the latest pushes to the yaml branch? I don't have any windows systems to test on. |
Woo success 2024-11-08 17:28:10,013 - app - INFO - YAML validation successful: C:\Users\zmanj\Documents\GitHub\KoalaKeys\cheatsheets\example-cheatsheet.yaml I also highly recommend a programable one! Here's a look at my customizations https://configure.zsa.io/moonlander/layouts/3aD3w/latest/0 Thanks for the fix - happy to be a windows tester. |
Awesome! Thanks for opening the issue. If you have any feature requests or any more issues let me know. I'll make sure to remember in case there are more Windows issues! |
I'm not a python dev so this could be really simple - but when I pull this down and try to run it no changes i get the following error.
2024-11-07 11:47:47,649 - app - ERROR - Error reading template file: 'charmap' codec can't decode byte 0x90 in position 17317: character maps to
I just downloaded the latest python to try it (3.13.0 - perhaps this is too new?).
The text was updated successfully, but these errors were encountered: