kakaroto/R20Converter

Error converting campaign with R20Converter v0.11.2 - 'data'

Closed this issue · 3 comments

Created clean campaign on Roll20 from the Dungeon of Mad Mage. Exported using Chrome Roll20 Exporter (0.8.1). On Convert (0.11.2), failed with the following error:

vtt@server:~/foundryconvert$ python3 /home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/main.py --export-as-module --campaign-title=madmage /home/vtt/foundrydata/Data/modules/madmage madmage.zip
*** Converting Campaign 'MadMage' ***
Creating Handout : Thank you for purchasing Dungeon of the Mad Mage
...
...
...
Creating Handout : Trobriand's Army
Creating Handout : Dark Elf Menace
Creating Handout : Nester's Fate
Creating Handout : -Death Tyrant
Creating Handout : Emerald Blade
Creating Handout : Gith Who's Coming to Dinner?
Creating Handout : Spire and Snail
Creating Handout : Guild of Many Eyes
Creating Handout : Immortal Insanity
Creating Handout : Skullport
Creating Handout : What Drow Fear
Creating Handout : Arcturiadoom
Creating Handout : Tangled Web
Creating Handout : Dwarfcraft
Creating Handout : School of Magic
Creating Handout : Mad House
Creating Character : Esvele Rosznar (The Black Viper)
'data'
Traceback (most recent call last):
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/main.py", line 115, in <module>
    converter.convert()
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/R20Converter.py", line 170, in convert
    self.actors = Actors(self)
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/entities/actors.py", line 16, in __init__
    self.entities = self.genEntities()
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/entities/actors.py", line 19, in genEntities
    return [Actor(self, character, index) for index, character in enumerate(self._characters)]
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/entities/actors.py", line 19, in <listcomp>
    return [Actor(self, character, index) for index, character in enumerate(self._characters)]
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/entities/actors.py", line 495, in __init__
    self.addActions(owned_items)
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/entities/actors.py", line 2138, in addActions
    self.addNPCAction(items, action, ItemActivation.ACTION)
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/entities/actors.py", line 2021, in addNPCAction
    self.createItemFeat(items, name, description_block, activation, attack, None)
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/entities/actors.py", line 1864, in createItemFeat
    item = self._converter.items.createItemFromCompendium(None, compendium_item, item.entity["data"])
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/entities/items.py", line 47, in createItemFromCompendium
    return Item.createItemFromCompendium(self, id, compendium_item, custom_data)
  File "/home/vtt/foundryconvert/R20Converter-0.11.2-linux/src/entities/items.py", line 178, in createItemFromCompendium
    item.entity["data"].update(custom_data)
KeyError: 'data'
Error converting campaign with R20Converter v0.11.2:
'data'
Please contact the author with the log of the error from the console window

Doh, it looks like there is a version v0.11.6 available. Trying that out...

The error is because you're using Foundry v10 which changed the format of the compendium data unfortunately. You'd need to use the latest R20Converter, I think I added support for v10 compendium in 0.11.5 or 0.11.6, and you're using 0.11.2.
If you don't have access to it anymore, you can always download the version of the game system that's v9 specific, instead of the latest v10 compatible one, that should let the converter run successfully.
Closing the issue, as it's already been fixed in a subsequent release.

Verified converted v0.11.6 is working past this error. Thanks.