Desk Accessories - Trainstop CSV export/import

by adamius

Bulk import and export of train stops using CSV text files to allow easier bulk editing.

Content
2 years ago
0.17 - 1.1
90
Trains

b [FIXED in 0.0.2] Crash on Factorio 0.17.35

4 years ago

Pressing export button.

Log :
50.881 Error MainLoop.cpp:1183: Exception at tick 16093232: The mod Desk Accessories - Trainstop CSV export/import caused a non-recoverable error.
Please report this error to the mod author.

Error while running event da-trainstops::on_gui_click (ID 1)
da-trainstops/control.lua:51: attempt to index field 'last_user' (a nil value)
stack traceback:
da-trainstops/control.lua:51: in function 'trainstops_export'
da-trainstops/control.lua:211: in function <da-trainstops/control.lua:197>

4 years ago
(updated 4 years ago)

cool. I'll fix in a few days. Strange, this error implies that no one created the train stop.

4 years ago
(updated 4 years ago)

Well, most of the time a bot build it,
But not all were build by bot; i'm sure about that.
Also, i quick build using Pipette tools from Picker Mod,

Also, many of the train stop is not vanilla, but comes from Train Supply manager Mod:
https://mods.factorio.com/mod/train-pubsub
There are vanilla trains stop in the map though.

So, perhaps a weird combination of those created this crash? 😒

4 years ago

My code assumes that last_user is never empty but that is poor coding so definitely due for a fix. I've got the next release to clean up so I'll add the fix then.

4 years ago

Update 0.0.2 is now available.
I can't reproduce the issue with last_user in vanilla.
Let me know if this update helped.

4 years ago

Thanks, literally just in time when i want to mass rename Train Stop.
Successfully Export and import.

Also, now that it's working; just like you predicted, it appear the previous error due 2 train stop is missing player name info.
It looks like this :
"","nauvis","player","Outpost Crude Oil","242,0,0","new name","new color","105","443","2393515"
"","nauvis","player","Outpost Maintenance","242,0,0","new name","new color","105","449","2392708"

And i think i know what cause it.
Both train stop were built by Recursive Blueprint Mod.
Still weird though, Recursive BLueprint mod only placed the blueprint, while the bot (from my personal roboport) do the work.

This give me worries if this quirkiness will have repercussion in the future (regarding other mod that may affected/rely on that info), because i plan to use Recursive Blueprint mod extensively.
That two train stop were just a test bed.

Anyway, thank you, This is very convenient way to mass rename train stop.

4 years ago

Uuuh,..another report.
But this is not a bug per-se.

For convenient editing, i open the csv files with Libre Calc, edit and saving there, then open that csv files in Notepad++ for copy paste operation in the games. It doesn't work. No train stop were renamed.

But, if i do manual copy paste directly to Notepad++ (not using LibreCalc), do rename then copy paste back in the game. It works.

I compare both version as text files (the original csv vs the copy paste and save in Notepad++), using text comparative program.
There are no difference.

So, what happened here ?

4 years ago
(updated 4 years ago)

Line endings? For now I'll lock this thread to keep it tight on the original bug you reported.
Thanks for the heads-up. You're welcome to add more in the new thread.

This thread has been locked.