Skip to content

recipe files saved with powershell > dont load - #53

Open
isaiahagi wants to merge 1 commit into
Leonxlnx:v1from
isaiahagi:v1
Open

isaiahagi wants to merge 1 commit into
Leonxlnx:v1from
isaiahagi:v1

Conversation

@isaiahagi

Copy link
Copy Markdown

saving a recipe from windows powershell and then rendering it doesnt work:

> earshot recipe dragon_roar > roar.json
> earshot make --recipe roar.json -o roar.wav
earshot make: error: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

recipe --check roar.json fails the same way.

powershell 5.1 writes utf-16 when you use >. its the same problem as #23, but recipe.load opens the file as utf-8-sig so only the bom case works there.

i changed it to use report.read_json like the cue, kit and spec files already do. build --recipe uses the same loader so it works with these files too.

added a test for utf-8, utf-8-sig and utf-16. the utf-16 one fails without the fix.

tested on windows 11, python 3.12, powershell 5.1. fast tests pass (4097 passed, 1745 skipped). didnt run the slow ones.

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

Successfully merging this pull request may close these issues.

1 participant