Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map label generation crash #32

Closed
speedfreak01 opened this issue Mar 26, 2019 · 3 comments
Closed

Map label generation crash #32

speedfreak01 opened this issue Mar 26, 2019 · 3 comments
Labels
backend issue for map generation bug Something isn't working

Comments

@speedfreak01
Copy link

speedfreak01 commented Mar 26, 2019

Hi,

Recently tried to use this code to generate a map for a seablocks game i've been playing.
Managed to get the map gen to work, however the code is dying when trying to generate labels

generating mapInfo.json
updating labels
disabling FactorioMaps mod
cleaning up
Traceback (most recent call last):
  File "auto.py", line 626, in <module>
    auto(*sys.argv[1:])
  File "auto.py", line 545, in auto
    mod = next(mod for mod in modVersions if mod[0] == m.group(1).lower())
StopIteration

For now I've removed the code in auto.py that handles the tag / label gen, and re-ran the gen with --dry to produce the mapinfo.js and other files required to view the map.

If i re-run the script with --dry without removing the label gen stuff i get the following

$ python auto.py --factorio=/e/factorio_maps_gen/bin/x64/factorio.exe --verbosegame --dayonly --dry
No save name passed. Using most recent save: SeaBlocks0.16.5
factorio path: e:\factorio_maps_gen\bin\x64\factorio.exe
output folder: script-output\FactorioMaps\SeaBlocks0.16.5
checking for updates
enabling FactorioMaps mod
updating labels
Traceback (most recent call last):
  File "auto.py", line 529, in auto
    rawPath = rawTags[tag["iconType"] + tag["iconName"][0].upper() + tag["iconName"][1:]]
  File "<string>", line 2, in __getitem__
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\multiprocessing\managers.py", line 811, in _callmethod
    raise convert_to_error(kind, result)
KeyError: 'fluidLiquid-molten-nickel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "auto.py", line 619, in <module>
    auto(*sys.argv[1:])
  File "auto.py", line 594, in auto
    kill(pid)

Happy to upload a copy of the map and mods if you need that for testing. I do use a fair few mods which might be the cause of this!

@L0laapk3
Copy link
Owner

Can you please upload a zip of all the mods you used, and the log files found in %TMPDIR%, then sort by most recently created and open the newest FactorioMaps-xxxxxxxx folder, in there you should find a log file.

@L0laapk3 L0laapk3 added bug Something isn't working backend issue for map generation labels Mar 26, 2019
@speedfreak01
Copy link
Author

Hey, sorry for the delayed reply.
I re-ran the script again today, looks like the folder in the %TMPDIR% is deleted after the script fails to complete.

I have attached a copy of the console output in case that helps, along with a copy of the mods dir, and savefile.

Mods: https://drive.google.com/open?id=1CU71VlO-OGTl6bGbdkVZsV2jA2YJJY0a
Save: https://drive.google.com/open?id=1ylCTBuahuzSzF9M5RAG4EYj_7UmFRgSZ
Console Log: https://drive.google.com/open?id=12JD_dch8m-dgkm93G97iUS09b2UQ0aYP

If there is anything else in that tmpdir that is needed, i can run the script again and try make a backup of files before they get deleted.

@L0laapk3
Copy link
Owner

This may or may not be fixed in v3.3.0, I can generate the map just fine but that could be because I updated the mods. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend issue for map generation bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants