MrPrimate / ddb-importer

Integrate your dndbeyond.com content into Foundry virtual tabletop
https://docs.ddb.mrprimate.co.uk/docs/intro
MIT License
203 stars 79 forks source link

Monster Muncher getting stuck. #180

Closed KJTailor closed 2 years ago

KJTailor commented 3 years ago

Hi,

I tried importing the 88 monster stat blocks from the new Fizban's book. The spells and items imported immediately without an issue, but the monsters are getting stuck.

In detail: When I start the import (exclusive only Fizban's) it will tell me it found 88 monsters to import and then start the import. However, it will never progress past a monster. No I am not impatient, I left it like that for about 1 h, with not progress whatsoever. What does work though, is closing the monster muncher and re-opening it. The previously imported monster is integrated into the compendium and it goes on to the next... just to get stuck again. Close monster muncher, re-open, restart import, import monster #2, and it gets stuck on #3. Rinse and repeat.

It clearly does import things, but for some reason it has issues importing the monsters properly? Relevant mods that I am using could be one that allows folders in compendiums?

Any idea, what's wrong here?

Cheers

MrPrimate commented 3 years ago

Can you try with other mods disabled to rule that out as a possibility?

KJTailor commented 3 years ago

yeah, sadly Compendium Folders was interfering with it. guess I have to disable it, import everything I want and re-enable it.| Mind be worthwhile putting something up in "Known Issues" or something?

Thanks though

MrPrimate commented 3 years ago

Okay, Compendium FOlders should be compatible - might be worth cleaning that compendium using the cleaning tool in Compendium Folders and trying again.

ravingdragoon commented 2 years ago

I am having the same issue. I tried fixing the compendium, then I tried cleaning them, same result. I get the following errors, the first almost immediately when I start the Monster Munch, the second and third after it is done parsing and is actually trying to import the monsters into the folders.

20:34:62.318 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'name')
[Detected 1 package: ddb-importer]
    at compendiumFolders (main.js:2933)
    at main.js:2960
    at Array.forEach (<anonymous>)
    at updateCompendium (main.js:2959)
    at async Function.parseItems (main.js:22088)
compendiumFolders @ main.js:2933
(anonymous) @ main.js:2960
updateCompendium @ main.js:2959
await in updateCompendium (async)
updateCompendium @ main.js:2959

20:40:08.098 main.js:1626 DDB Importer | ERR > error parsing NPC: TypeError: Cannot read properties of undefined (reading 'name') Adult Emerald Dragon
log @ main.js:1626
error @ main.js:1646
(anonymous) @ main.js:4159

20:40:08.098 main.js:1626 DDB Importer | ERR > TypeError: Cannot read properties of undefined (reading 'name')
    at compendiumFolders (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.19/dist/main.js:2933:87)
    at addNPCToCompendium (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.19/dist/main.js:3828:82)
    at async parseNPC (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.19/dist/main.js:4148:3)
log @ main.js:1626
error @ main.js:1646
(anonymous) @ main.js:4160
dpschreiner commented 2 years ago

for me on forge-vtt, the importer always freezes while importing "Alhoon" from Volo's Guide.

I tested another monster from Volo's: Archdruid using the search filter, and it worked fine.

as a workaround, is there a way to specify a boolean NOT in the monster search filter? i looked through the code and couldn't find where body.searchTerm is actually used.

dpschreiner commented 2 years ago

sorry, i did also test this with only the ddb-importer module enabled.

dpschreiner commented 2 years ago

some monsters other than Alhoon that seem to hang, in case there is a common cause (perhaps to do with spells?):

Nezznar the Black Spider Mind Flayer Arcanist Githzerai Monk Arcanaloth (summoner variant) Drow Mage

MrPrimate commented 2 years ago

@dpschreiner All the monsters work for me on the forge

What version of DDB Importer, Foundry and 5e are you using?

(And you imported the spells first right?)

dpschreiner commented 2 years ago

DDB importer: 2.6.22 Foundry: 0.8.9 5e: 1.5.5

i did import spells first, but it's possible i failed to do so once... should i just delete various compendia and try again?

MrPrimate commented 2 years ago

@dpschreiner what error message do you get in the console?

dpschreiner commented 2 years ago

good point, i didn't even look there. firstly there were couple negative parse warnings, but then during the hang i see:


main.js:1626 DDB Importer | ERR > error parsing NPC: TypeError: Cannot set properties of undefined (setting 'material') Alhoon
log @ main.js:1626
error @ main.js:1646
(anonymous) @ main.js:4166
Promise.catch (async)
(anonymous) @ main.js:4165
addNPC @ main.js:4160
parseCritters @ main.js:18333
main.js:1626 DDB Importer | ERR > TypeError: Cannot set properties of undefined (setting 'material')
    at getSpellEdgeCase (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.22/dist/main.js:3956:36)
    at https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.22/dist/main.js:4010:7
    at Array.map (<anonymous>)
    at addSpells (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.22/dist/main.js:4005:55)
    at async buildNPC (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.22/dist/main.js:4110:3)
    at async parseNPC (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.22/dist/main.js:4153:13)
log @ main.js:1626
error @ main.js:1646
(anonymous) @ main.js:4167
Promise.catch (async)
(anonymous) @ main.js:4165
addNPC @ main.js:4160
parseCritters @ main.js:18333
main.js:1626 DDB Importer | ERR > TypeError: Cannot set properties of undefined (setting 'material')
log @ main.js:1626
error @ main.js:1646
parseCritters @ main.js:22760
main.js:1626 DDB Importer | ERR > TypeError: Cannot set properties of undefined (setting 'material')
    at getSpellEdgeCase (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.22/dist/main.js:3956:36)
    at https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.22/dist/main.js:4010:7
    at Array.map (<anonymous>)
    at addSpells (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.22/dist/main.js:4005:55)
    at async buildNPC (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.22/dist/main.js:4110:3)
    at async parseNPC (https://assets.forge-vtt.com/bazaar/modules/ddb-importer/2.6.22/dist/main.js:4153:13)
log @ main.js:1626
error @ main.js:1646
parseCritters @ main.js:22761```
dpschreiner commented 2 years ago

not sure if relevant but i am using DAE SRD Items for imported spells.. (and almost everything else). do you recommend a separate compendium?

MrPrimate commented 2 years ago

@dpschreiner you should use a separate compendium.

You're also going to want to not use the DAE or a compendium supplied by a module as when they update they replace the entire content.

dpschreiner commented 2 years ago

thank you very much. it is proceeding now!