Wintermute0110 / NARS

Utiliy to filter MAME or No-Intro console ROMs
5 stars 1 forks source link

[Error] invalid syntax #2

Closed ErAzOr2k closed 7 years ago

ErAzOr2k commented 8 years ago

Hi,

I'm getting this error running this tool on windows machine (python 2.7). I also tried cygwin, but get the same error.

File "C:\Program Files\cygwin64\usr\NARS\nars-console.py", line 26, in import NARS File "C:\Program Files\cygwin64\usr\NARS\NARS.py", line 592 print(infoString + " " + filename + "... ", end="") ^ SyntaxError: invalid syntax

Can you help me?

Thanks

Wintermute0110 commented 8 years ago

Hi,

you need Python3 to run NARS. You shoud be able to install both Python 2.x and 3.x in Cygwin.

Keep in mind I am doing a big refactoring of the software. nars-console should work OK, but nars-mame is currently very unstable. I am adding a lot of new features and changing the filtering scheme of MAME ROMs to deal with the merge of MAME and MESS. Any other question you have please ask.

ErAzOr2k commented 8 years ago

Thanks for your feedback. seems like nars-console is also broken:

O:\Tools\NARS>nars-console.py list-tags SNES NARS Advanced ROM Sorting - Console ROMs version 0.2.0_alpha1 [Parsing config file] [Listing tags] Filter name = SNES Traceback (most recent call last): File "O:\Tools\NARS\nars-console.py", line 1583, in main(sys.argv[1:]) File "O:\Tools\NARS\nars-console.py", line 1534, in main do_taglist(args.romSetName) File "O:\Tools\NARS\nars-console.py", line 1171, in do_taglist NARS.have_dir_or_abort(sourceDir); TypeError: have_dir_or_abort() missing 1 required positional argument: 'infoStr'

Wintermute0110 commented 8 years ago

You are right... did some changes in the NARS module and other parts while working on nars-mame and forgot to update nars-console.

Will have a look ASAP. Will write here when nars-console is done. nars-mame will take me some more time.

Wintermute0110 commented 8 years ago

nars-console should be working now.

nars-mame is currently broken until I finish the new Include/Exclude and Orientation filters.

ErAzOr2k commented 8 years ago

It's working now so far. Thank you very much :)

It's seems that the parameter check-filter is not implemented. I'm getting: Unrecognised command check-filter

And I also have a question: is there a way to observe all Tags in "includeTags" with just one parameter like "all" or somthing. Because it's much work to manually add Tags for each Rom collection in the config file.

Kind regards

Wintermute0110 commented 8 years ago

Hi,

check-filter has been renamed to check for consistency amount the utilities. In the meantime the documentation is updated please always trust ./nars-console.py usage, it's always the most updated reference for the commands.

Second question: if you you want to include all the ROMs I suppose you also want to exclude none. In this case, just leave and empty and the Include/Exclude filters will have no effect. If you do so, then NARS-console will get a 1Game1ROM list for you including all ROMS and excluding none.

Also, if you think of a new feature please tell me. It's been a long time since the last release and I want to finish 0.2.0 ASAP.

ErAzOr2k commented 8 years ago

If just leaving blank, I get this error:

[Filtering ROMs] Traceback (most recent call last): File "nars-console.py", line 1597, in main(sys.argv[1:]) File "nars-console.py", line 1560, in main do_update(args.romSetName) File "nars-console.py", line 1285, in do_update romMainList_list = get_Scores_and_Filter(romMainList_list, rom_Tag_dic, filter_config); File "nars-console.py", line 951, in get_Scores_and_Filter has_excluded_tag = isTag(tags, excludeTag_list); File "nars-console.py", line 752, in isTag for testTag in tag_list: TypeError: 'NoneType' object is not iterable

I think you meant a the config like this:

Also completely remove those tag didn't help.

Wintermute0110 commented 8 years ago

Will have a look at it now...

ErAzOr2k commented 8 years ago

One thing I noticed:

For example in the N64 No-Intro Set there is one game with two different names:

<game name="Top Gear Rally 2 (Europe)">
    <description>Top Gear Rally 2 (Europe)</description>
    <release name="Top Gear Rally 2 (Europe)" region="EUR"/>
    <rom name="Top Gear Rally 2 (Europe).n64" size="12582912" crc="88C8A6EA" md5="E440BA3B06ABC2749D765D196323EED4" sha1="CDEBA42C305995A7FB66B26C8DAF4E135152ABEC" status="verified"/>
</game>

and

<game name="TG Rally 2 (Europe)" cloneof="Top Gear Rally 2 (Europe)">
    <description>TG Rally 2 (Europe)</description>
    <rom name="TG Rally 2 (Europe).n64" size="12582912" crc="B5E8A1DF" md5="A2C3EC262B1DB91463369CBDCAA1C4AB" sha1="77BAF3DD7B20C2C7FAAE4944D1F9D30476A25AAC" status="verified"/>
</game>

In nars-console these games are scored with my filtering like this:

TG Rally 2 1 [IH] TG Rally 2 (Europe).zip 1 [IH] Top Gear Rally 2 (Europe).zip -8 [IH] Top Gear Rally 2 (USA).zip -9 [IH] Top Gear Rally 2 (Japan).zip So TG Rally 2 (Europe).zip is selected. But wouldn't it be better if it would select Top Gear Rally 2 (Europe).zip, as TG Rally 2 (Europe).zip ist just a clone?
Wintermute0110 commented 8 years ago

Hi,

Fixed the problem of leaving , , , empty in nars-console.

Regarding the problem of the previous post, you are right. Problem is that the parent-clone list is placed in a dictionary, for performance reasons, and then original order is lost. I am thinking of a solution.

Wintermute0110 commented 8 years ago

Just did some changes to tackle the Top Gear Rally 2 issue. Now, if there are 2 or more ROMs in the set that get the same top score, the parent ROMs is always selected. Also, I improved the flags in nars-console.py check and you can always see what is the parent ROM in every pclone ROM set. nars-console.py list-nointro listing has been also improved.

I did some basic testing, however there maybe bugs...

ErAzOr2k commented 8 years ago

Thank you. I'll try it in the weekend :)