PyAI bug hunting

Help - Resources - Discussion
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Wed Apr 01, 2009 7:10 pm

Well I can't seem to reproduce these problems, other then it asking for stat_txt.tbl until I choose one. Can you give exact steps to reproduce the problems?
User avatar
Archon_Wing
Posts: 901
Joined: Wed Jul 25, 2007 11:22 pm

Postby Archon_Wing » Wed Apr 01, 2009 7:53 pm

Those were the only steps: Open any aiscript.bin, Select the external definition file, unitdef.ini, in the PYMS folder , import from any text file.

Here's another example that I can duplicate 100%

Download this aiscript.bin, bwscript.bin and .txt file

Import the .txt file to "zerg expansion custom level".

This always appears to me:

Exception in Tkinter callback
Traceback (most recent call last):
File "Tkinter.pyc", line 1410, in __call__
File "PyAI.pyw", line 3316, in iimport
File "LibsAIBIN.pyc", line 1367, in interpret
IndexError: list assignment index out of range

Other notes: This particular set of files has all the zerg scripts in bwscript.bin. Upon opening the "zerg expansion custom level" (without importing) in the latest version, all previously externally linked scripts can't be displayed at all, though all the scripts are clearly in the list and are marked as bwscript.

More Notes 2: Importing to the Protoss Scripts (they are in aiscript.bin) does not cause an error when importing. However, attempting to save to aiscript.bin causes the same tkinter callback error above.
User avatar
poiuy_qwert
Posts: 548
Joined: Sun Jan 13, 2008 2:14 am

Postby poiuy_qwert » Sun Apr 12, 2009 5:20 pm

Alright. I still cant reproduce the always asking for stat_txt problem, but I'm guessing it will be gone next version anyway.

The error is a problem with removing unused labels from bwscript.bin, and is fixed for next version. Some of my bwscript.bin support is not fully tested since not many people use it, sorry for the inconvenience. (Edit: Fixed)

The zerg externally linked scripts arn't all being decompiled because of another problem with my bwscript support, I havn't fully looked into it but it'll be fixed for next version.

I also cant seem to get this error from any of the files you posted:
[quote name='Archon_Wing' post='6167' date='Mar 26 2009, 07:52 PM']Getting this when trying to save

Exception in Tkinter callback
Traceback (most recent call last):
File "Tkinter.pyc", line 1410, in __call__
File "PyAI.pyw", line 2809, in saveas
File "PyAI.pyw", line 2792, in save
File "LibsAIBIN.pyc", line 1691, in compile
KeyError: 585[/quote]
Maybe it was a result of one of the other errors?

Thanks! A new version will be coming out soon, probably once I've fixed these issues if nothing else comes up.
User avatar
Myk
Posts: 252
Joined: Sat Jun 13, 2009 12:56 pm

Postby Myk » Thu Jul 09, 2009 7:20 am

Important issues:
I get crashed with Windows Folder Tips enabled. It took me a while to figure out what was going on, but it solved a ton of issues with opening files with PYAI.

Also, PYAI seems to have a weird attraction towards renaming random blocks in my scripts. I've got the option set to save comments and labels. I've tried all sorts of names/labels to try and dodge that affect with no success.

Minor issues:
Is it possible to have the PYAI aiscript.bin opener display more clearly when the new content isn't saved? Like, in the PYAIscript editor, it lets you know by the fuzzed out disc in the corner if you haven't saved. In the script lister window it always shows the disc and "save successful!" It would be nice to have a little more positive feedback, I guess.

Thanks for the nice programs. :)
User avatar
Myk
Posts: 252
Joined: Sat Jun 13, 2009 12:56 pm

Postby Myk » Wed Jul 15, 2009 5:18 am

[quote name='bajadulce' post='7046' date='Jul 13 2009, 07:03 PM'][quote name='Myk' post='6966' date='Jul 9 2009, 12:20 AM']Also, PYAI seems to have a weird attraction towards renaming random blocks in my scripts. I've got the option set to save comments and labels. I've tried all sorts of names/labels to try and dodge that affect with no success.[/quote]I've started converting some of the old BWAIWar3 scripts and am not experiencing this? I'll try to post my steps soon.

Edit:
Well here's something to report of a similar topic. PyAI seems to have a little trouble converting blocks that have capitalization. Peppe's SCAIEdit3 Protoss script will report errors after converting. I didn't spend a whole lot of time looking at the before and after scripts to see what was really happening. Could be just bad labeling in SCAIEdit. It seemed to involve words separated by an underscore such as dark_Archon or scv_Production_Loop. I just manually changed the ones that were reported as errors.

here is link to script btw.
http://www.broodwarai.com/forums/index.php...post&id=723
[/quote]

It's entirely possible that I'm just doing something wrong or in the wrong order or something of that sort.

I've played around with caps, random jumbles of letters and it always seems to produce the same affect - renaming of labels.

Select a solid script in which everything is pretty dead on; all labels are used and you get no errors. Import it into your aiscript.bin. It should note that there are no errors.
Now, open the script to edit it using the pyai text/script editor and hit the save or check button. Try 3-4 scripts to see if anything bugs out. Scripts with Blizzard style block names don't really seem to be affected by this.
If you can't find a fault this way, the last test is for me to post a script of mine that I know that bugs out. If it's just a problem with my computer, it'll be apparent.
User avatar
Myk
Posts: 252
Joined: Sat Jun 13, 2009 12:56 pm

Postby Myk » Wed Jul 15, 2009 7:08 am

[quote name='bajadulce' post='7078' date='Jul 14 2009, 10:26 PM']ahh.. Yes, once you import the script, the compiler takes over and does its thing. I thought you were referring to the SCAIEdit>PyAI converter screwing up your labels/block names. The converter seems to work fine except for the capitalization bug that is noted. I have only worked on scripts via importing them directly from .txt files and then exporting them as .txt files before exiting the editor. I have not been working with the compiled or "saved" version of any script i.e. opening it from aiscript.bin.

I see there is a "label" saver button. Not sure what its supposed to do? Emulate SCAIEdit's ability to open saved aiscript.bin scripts as they were written? I always just imported/exported my working .txt files with PyAI. Once compiled, I really didn't care what happened to the scripts in terms of block names.[/quote]

Well, I guess I'm wrong for attempting the use of the built in script editor to edit scripts. :P

I've been using Notepad++, after it being recommended to me by Archon Wing, without any sort of trouble. :)
User avatar
Archon_Wing
Posts: 901
Joined: Wed Jul 25, 2007 11:22 pm

Postby Archon_Wing » Wed Jul 15, 2009 6:13 pm

Eh, I usually just use the editor as a validation tool. But as of late, I just import in and if it compiles then I don't really care anymore. :lol:

Return to “PyMS (poiuy_qwert's complete modding suite)”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest