tralph3 / Cue-Maker

A simple and easy to use program that fetches original cue files for your roms.
GNU General Public License v3.0
27 stars 7 forks source link

local variable 'fileName' referenced before assignment #12

Closed 4gordi closed 2 years ago

4gordi commented 2 years ago

Hi, i have a problem with this script, when i starting script on windows 10 console with parametres: python CueMaker.py -zgm playstation C:\Users\anonimous\Desktop\123 I take a message Traceback (most recent call last): File "C:\Users\anonimous\Desktop\Cue-Maker-master\CueMaker.py", line 412, in <module> generateCue(file) File "C:\Users\anonimous\Desktop\Cue-Maker-master\CueMaker.py", line 136, in generateCue cuePath = fileDirectory + fileName[0:len(fileName) - 4] + ".cue" UnboundLocalError: local variable 'fileName' referenced before assignment

Python 3.10 windows 10

tralph3 commented 2 years ago

I think I see what happened, could you try again now please? Make sure to re-download the program.

4gordi commented 2 years ago

Now i have a error after creating cue and starting creating m3u: Traceback (most recent call last): File "C:\Users\anon\Desktop\Cue-Maker-master\CueMaker.py", line 416, in <module> createM3u(cueFiles) File "C:\Users\anon\Desktop\Cue-Maker-master\CueMaker.py", line 272, in createM3u if fileName.lower().find(" (disc") != -1 or fileName.lower().find("_(disc") != -1: UnboundLocalError: local variable 'fileName' referenced before assignment

4gordi commented 2 years ago

And how i can update your or creating myself links.cfg and what would be in psx.hash and Sony PlayStation Cue Sheets (redump.org)?

tralph3 commented 2 years ago

The links.cfg file contains links to a file that has the sha1 hash for all the games on that system. The info was taken from redump.org, and parsed with a string to get it into this format. I don't think I have that script lying around currently, but it shouldn't be too hard to re-create it.

As for the "base", that's just a string that is used as a prefix to create a link to the cue file that needs to be downloaded. So for instance you can have "link.com/playstation/" as a base, and then the program adds "Silent Hill.cue" at the end, then it would be able to download the cue.

As a side note, this system is complete and absolute garbage and I'd like this program to burn in hell. But alas, I can't do that now. String manipulation is error-prone, and this program is full of it... shame.

I'll see what I can do about that error.

tralph3 commented 2 years ago

I believe it should be fixed now....