3096 / genshin_scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I got some error !

NewbieLady opened this issue · comments

commented

pip install mido

pip install mido

i have already installed

have you added the midi path to json file? i havent got this problem

have you added the midi path to json file?

yes !

remove and reinstall mido maybe?

image
how LOL

commented

seems like your json file formatting got issue?

seems like your json file formatting got issue?

idk :(

commented

if you have a windows path, you need to use double backslashes in json
like this: D:\\bruh\\moment.mid

if you have a windows path, you need to use double backslashes in json
like this: D:\\bruh\\moment.mid

okay thk i will try it

commented

if you have a windows path, you need to use double backslashes in json
like this: D:\\bruh\\moment.mid

erm for the file path in python, cant the code just accepts raw string instead? Cause I feel that end user should not be concerned with escape characters.

if you have a windows path, you need to use double backslashes in json
like this: D:\\bruh\\moment.mid

It worked thk u so much !

commented

if you have a windows path, you need to use double backslashes in json
like this: D:\\bruh\\moment.mid

erm for the file path in python, cant the code just accepts raw string instead? Cause I feel that end user should not be concerned with escape characters.

I believe that's part of the json standard actually so the built in parser requires escape I think

commented

erm for the file path in python, cant the code just accepts raw string instead? Cause I feel that end user should not be concerned with escape characters.

I believe that's part of the json standard actually so the built in parser requires escape I think

I recall encountering that problem myself in the past, what I did before json.loads() is to do text.replace('', '\') prior to loading it as a dictionary, only if there is an exception. The validation portion is a messy code though.

commented

erm for the file path in python, cant the code just accepts raw string instead? Cause I feel that end user should not be concerned with escape characters.

I believe that's part of the json standard actually so the built in parser requires escape I think

I recall encountering that problem myself in the past, what I did before json.loads() is to do text.replace('', '') prior to loading it as a dictionary, only if there is an exception. The validation portion is a messy code though.

I agree. it would also break any case when you do need a \escaped character (although unlikely anyone would actually need one).

rather undesired

double backslash will probably have to do for now