L0laapk3 / FactorioMaps

L0laapk3's FactorioMaps mod
https://mods.factorio.com/mod/L0laapk3_FactorioMaps
Other
122 stars 22 forks source link

ValueError: invalid literal for int() with base 10: 'nauvis' #70

Closed PirateIncognito closed 4 years ago

PirateIncognito commented 4 years ago

https://i.imgur.com/xtnINfd.png

EDIT: This save file is problematic and will not process. https://drive.google.com/open?id=1WB48Bau1E0BYc2fRQCaWkMcnwgwf66NH

I don't know it this error is fatal, but I'm having issues getting the script to complete and generate the index.html file.

I have 178 save files I want to process and this error starts somewhere within the first 10 or so, then it seems to appear in every file hence.

Also the script seems to randomly hang at different steps (I run it overnight).

Any guidance would be helpful. I'm not running any mods (the files were saved with mods), factorio v.17.79

I will continue to troubleshoot the script by reducing the number of files until it successfully completes.

5/15/2020 Update

I stepped through the code using Wing Python IDE.

Here's a screenshot of the debug. https://i.imgur.com/S1sd4oZ.png

https://github.com/L0laapk3/FactorioMaps/blob/36cb312393d16a55aa1f9294a4b11c1979790fe9/ref.py#L179

Because of LINE 177 this exception will only happen if when the save file is DAY 20. str(z) is Zoom Level 20 specified somewhere else in the code.

I don't know what the purpose of LINE 177 is, but the CONTINUE on LINE 178 will skip LINE 179, 180 for all other days that are not 20.

I don't know what values cropList[key] expects, but LINE 179 will always fail because pathSplit[1] is 'nauvis' and you're typecasting to INT. 179: key = (surfaceName, daytime, str(z), int(pathSplit[1]), int(os.path.splitext(pathSplit[2])[0]))

I'm wondering if the code should read similar to LINE 172: pathSplit[0] which would be 20 179: key = (surfaceName, daytime, str(z), int(pathSplit[0]), int(os.path.splitext(pathSplit[2])[0]))

But I don't know what the difference between version 1 and version 2 are.