donmai-me/MaiConverter

ValueError: Invalid Literal for int() with base 0

brian-vb opened this issue · 9 comments

Hi! Thanks for updating. The error does not happen anymore. However, now I am getting a ValueError: invalid literal for int() with base 0. This happens both when I input the key in hex and input the key in ASCII. Is it that my key is wrong?

Originally posted by @brian-vb in #7 (comment)

Did you prepend your hex key with 0x?

The command should be something like this (notice the 0x before the example key in hex):
maiconverter encrypt /path/to/chart.sdt --key 0xFEDCBA987654321

Yes I did prepend the hex key with 0x and is saved in a file called key.txt

Why do you mention a file named key.txt? The key parameter should only be a hex literal (0-9 A-F). I'm not sure if you're giving the path to your key.txt file but key parameter doesn't accept file paths.

Oh I see! I have just input the Hex Key without the file and it now shows an Overflow Error where the integer is too big to convert. Thank you so much for your advice and really sorry to trouble you so much!

The command is now currently py -m maiconverter encrypt xxx.sdt --key (0xabcdef....)

That means your key is over 0x10 or 16 bytes which is the size of old maimai's chart key. Kindly check your key and make sure it's not mixed with other stuff like an IV.

That's strange. I am pretty sure the AES Key I have was from the Discord Server. Is there a way I can send my keys to you to see if I have the right ones? Thank you!

I copy-pasted keys and they all worked. If your hex key (without the 0x) is not 32 characters in length, then you have the wrong key.

Try asking for help in #support in MaiMai Tea Discord server. If you're not in, then the invite link is at README.md.

Alright! I will join the discord. Thank you!

Closing since the problem is not with the program.