This one also doesn't make sense, although it's an unrelated error. abstract_building_templest has a deity_type field in both DFHack 0.47.04-r1 and r2 (I checked the release builds of both).
How did you obtain DFHack? What version of DFHack are you using (run "help" if you don't know)?
Can you try running the following command (it should print -1)?
:lua print(df.abstract_building_templest:new().deity_type)
Good news! I finally got it to work and it was thanks to this post that I got that idea that maybe there was something buggy with the LNP version I was using. The dfhack version I was using was from
this LNP pack and the version number the dfhack gave me was 0.47.04-alpha0. I bit behind, but the exportlegends.lua that came with the game would not work, and I used the most recent version of the lua off the github in hopes it would work and as you could see--It was giving me a bunch of issues. At first I attempted to upgrade the dfhack manually but could not find a linux version of TWBT that supports the newest version of dfhack, so I reverted back to the alpha0. However, I recently discovered that the LNP for linux has a github itself and there, it has a much more newer release than dffd.bay12games.com had. I downloaded, extracted it and started it up and exportlegends.lua now works
perfectly. No crashes what so ever and legends_plus is able to generate. I gotta admit, it's pretty satisfying when something starts working after you spend a few days head scratching and wondering what's wrong. I am so sorry about the extra work that had to be put in this when the solution ended up being pretty simple. Would you like me to trouble shoot for the version I was using still? Or should we call this case closed?
My Bitdefender keeps deleting my dfhack-run.exe saying that it contains a Trojan.GenericKD.34432417...Should I worry?
I would make an exception in my antivirus so that it would stop deleting dfhack. Most antiviruses probably don't like applications like dfhack because it links up with the game and runs it's own scripts. So long as you downloaded dfhack straight from the source or from a LNP pack, it should be safe to use.