DanielKote / Foreman2

Visual planning tool for Factorio
Other
158 stars 14 forks source link

Error while importing new present #39

Closed th7mo closed 2 years ago

th7mo commented 2 years ago

Hi, I want to try out this promising tool, but I got an issue when I wanted to import my personal mod settings. I have no experience with the underlying logic for factorio modding (I only know how to install and play them :)) so I don't really know how issues like this arise.

image

I looked into the closed issues and tried most of the things discussed in issue #4, but I had no success so far. I am currently playing the modpack pyblock (basicly pyanodon suite but on a Island + some QOL mods.

Factorio version: 1.1.59 Foreman2.0 version: dev12

When I read the errorExporting.json file it ended on the following:

  11.701 Checksum for script __pyalienlife__/control.lua: 214164611
  11.702 Checksum for script __PyBlock__/control.lua: 3205793430
  12.557 Script @__qol_research__/control.lua:20: [qol] configuration change detected, updating for all forces and resetting technology effects
  12.606 Script @__pyalienlife__/control.lua:742: hit
  12.826 Goodbye
   0.000 Error Util.cpp:83: The mod PyBlock (0.2.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event PyBlock::on_configuration_changed
__PyBlock__/control.lua:349: attempt to index field '?' (a nil value)
stack traceback:
    __PyBlock__/control.lua:349: in function <__PyBlock__/control.lua:347>

------------- Error -------------
The mod PyBlock (0.2.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event PyBlock::on_configuration_changed
__PyBlock__/control.lua:349: attempt to index field '?' (a nil value)
stack traceback:
    __PyBlock__/control.lua:349: in function <__PyBlock__/control.lua:347>
---------------------------------

full error json (as .txt file) here: errorExporting.txt

config.ini file: config.ini.txt

I know the error says that the issue is caused by PyBlock, but is it possible that it is something else? I have no problem playing the game (version 1.1.59) and I have no compatibility issues when running Factorio.

used mods:

Bottleneck_0.11.7.zip
    deadlock-beltboxes-loaders_2.4.2.zip
    DeadlocksStackingForPyanadon_0.5.0.zip
    flib_0.10.1.zip
    FNEI_0.4.1.zip
    helmod_0.12.9.zip
    Krastorio2Assets_1.1.0.zip            [DESELECTED FOR CURRENT AND NEW GAME(S)]
    Krastorio2_1.2.25.zip                 [DESELECTED FOR CURRENT AND NEW GAME(S)]
    pyalienlifegraphics2_1.1.8.zip
    pyalienlifegraphics3_1.2.5.zip
    pyalienlifegraphics_1.3.3.zip
    pyalienlife_1.12.4.zip
    PyBlock_0.2.2.zip
    pycoalprocessinggraphics_1.0.9.zip
    pycoalprocessing_1.9.3.zip
    pyfusionenergygraphics_1.0.7.zip
    pyfusionenergy_1.6.7.zip
    pyhightechgraphics_1.1.2.zip
    pyhightech_1.7.6.zip
    pyindustry_1.5.2.zip
    pypetroleumhandlinggraphics_1.0.10.zip
    pypetroleumhandling_2.0.6.zip
    pyraworesgraphics_1.0.9.zip
    pyrawores_2.2.7.zip
    qol_research_3.3.0.zip
    RateCalculator_2.4.4.zip
    Squeak Through_1.8.2.zip
    stdlib_1.4.6.zip
    StoneWaterWell_1.20.1.zip
    VehicleSnap_1.18.4.zip

any help is appreciated a lot! Thnx

th7mo commented 2 years ago

Update: I searched for the line that caused a error:

__PyBlock__/control.lua:349: attempt to index field '?' (a nil value)

and found this lines of code:

script.on_configuration_changed(function()

if game.players[1].name == 'kingarthur' then
    game.print('i see you')
end

end)

I removed this part of the control.lua file of the Pyblock mod and now it is working perfectly. The error is not part of the Foreman2 code.