Nanobots: Early Bots 3.0


Personal construction nanobots with quality support - Enhanced Performance Edition Personal nanobots for construction, repair, and turret ammo delivery - no roboports needed! Features quality support, combat automation, statistics GUI, and megabase optimization. Fully compatible with Factorio 2.0 and Space Age.

Content
2 days ago
2.0
3.44K
Logistic network

g Broken when used with Pyanodons Post Processing

4 days ago
(updated 4 days ago)

Nanobots3 crashes on startup when run alongside Pyanodons Post Processing.
0.273 Loading mod Nanobots3 5.8.5 (data.lua)
0.309 Error Util.cpp:81: Failed to load mod "Nanobots3": Cannot serialise ttype=function
Same error on 5.8.4. Same error on Nanobots2. Disabling all Py mods lets it load. The 5.8.5 patch targeted a different Py crash and didn't fix this.
Relevant discussions:
- pypostprocessing + stdlib conflict (https://mods.factorio.com/mod/pypostprocessing/discussion/671c0f445cd1caa9ff6ae0fb) — same Cannot serialise ttype=function with other stdlib-dependent mods, traced to Data:copy()

3 days ago

Thanks for the detailed report, and for digging up the pypostprocessing discussion — that pointed straight at the cause. You're right that the 5.8.5 patch fixed a different Py crash; this one is separate.

Root cause: the stdlib2 Data wrapper leaves a metatable with functions attached to the prototypes. When pypostprocessing serialises data.raw at the end of the data stage, it can't serialise those functions, hence "Cannot serialise ttype=function". Same issue other stdlib-based mods (Reverse Factory, etc.) hit.

Fixed in v5.8.6: added a data-final-fixes step that strips those metatables and stray function fields from the mod's prototypes so they serialise cleanly. Prototype values are unchanged. Please update and let me know if it loads now — I don't run the full Py set myself, so confirmation would help.

3 days ago

sadly no joy

0.278 Loading mod Nanobots3 5.8.6 (data.lua)
0.313 Error Util.cpp:81: Failed to load mod "Nanobots3": Cannot serialise ttype=function

Appreciate you looking into this though!

Let me know if I can get you more detailed logs/config (and how)

2 days ago

You were right to be skeptical — 5.8.6 didn't fix it because the crash happens during the data stage, before my data-final-fixes step ever runs (your log timing at 0.313 made that clear).

The real cause is stdlib2's Data/Recipe wrappers attaching function-carrying metatables to the prototypes; pypostprocessing serialises data.raw and chokes on those functions. The fix other stdlib-based mods used (Reverse Factory, etc.) was to drop stdlib from the data stage entirely, so that's what I did in v5.8.7 — the sounds, equipment chips, roboport-interface, and bob-mod recipe edits are now built with native data:extend. No stdlib left in the data stage.

I can't run a full Py set myself, so I'd really appreciate a load test on 5.8.7. If it still crashes, a startup log would help a lot — you can grab it from %appdata%\Factorio\factorio-current.log (Windows) or ~/.factorio/factorio-current.log (Linux/Mac), right after the crash. Thanks for sticking with this!

2 days ago

Quick follow-up: 5.8.7 fixed the serialise crash by removing stdlib from the data stage, but introduced a separate load error (a bad radar "pictures" field) that hit everyone. That's now fixed in v5.8.8. So please grab 5.8.8 rather than 5.8.7 for the Pyanodons test — it should both load past the serialise error and start cleanly. Let me know how it goes, and a factorio-current.log if anything's still off.

17 hours ago

That did the trick. Actively using it now. thanks!

17 hours ago

Awesome, glad it's working! Thanks for confirming — that closes the loop on this one. Happy building!

This thread has been locked.