ebullient / ttrpg-convert-cli

Utility to convert JSON data (for content you own) from 5etools or pf2etools into Obsidian-friendly Markdown.
https://www.ebullient.dev/projects/ttrpg-convert-cli/
Apache License 2.0
192 stars 38 forks source link

I keep getting a java.lang.NullPointerException when trying to run the basic CLI #110

Closed mertaugh1234 closed 1 year ago

mertaugh1234 commented 1 year ago

I was trying to run this line as is: 5e-convert \ --index \ -o dm \ -s PHB,DMG,SCAG \ 5etools-mirror-1.github.io/data \ 5etools-mirror-1.github.io/data/adventure/adventure-lox.json \ 5etools-mirror-1.github.io/data/book/book-aag.json \ my-items.json dm-sources.json and I have limited knowledge of how this works but I know that I have made a mirror of the 5e-tools github. I figured that it would just make a folder titled DM within the folder then populate it with the base books information. I don't know why but I keep getting this error:

java.lang.NullPointerException at java.base/java.util.TreeMap.compare(TreeMap.java:1291) at java.base/java.util.TreeMap.put(TreeMap.java:536) at java.base/java.util.TreeSet.add(TreeSet.java:255) at dev.ebullient.convert.io.Tui.readToolsDir(Tui.java:401) at dev.ebullient.convert.io.Tui_ClientProxy.readToolsDir(Unknown Source) at dev.ebullient.convert.RpgDataConvertCli.call(RpgDataConvertCli.java:198) at dev.ebullient.convert.RpgDataConvertCli.call(RpgDataConvertCli.java:39) at picocli.CommandLine.executeUserObject(CommandLine.java:2041) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at dev.ebullient.convert.RpgDataConvertCli.executionStrategy(RpgDataConvertCli.java:253) at picocli.CommandLine.execute(CommandLine.java:2170) at dev.ebullient.convert.RpgDataConvertCli.run(RpgDataConvertCli.java:273) at dev.ebullient.convert.RpgDataConvertCli_ClientProxy.run(Unknown Source) at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:129) at io.quarkus.runtime.Quarkus.run(Quarkus.java:71) at io.quarkus.runtime.Quarkus.run(Quarkus.java:44) at io.quarkus.runner.GeneratedMain.main(Unknown Source)

I have also installed quarkus and run the quarkus build function prior to getting this error. I will also attach my folder structure for reference. Any help would be greatly appreciated, I just want to get the data files in obsidian so that I can have the references for the dnd campaign I am in.

java lang NullPointerException

ebullient commented 1 year ago

let me double check a few things... my guess is that some data has changed recently given this failure: https://github.com/ebullient/ttrpg-convert-cli/actions/runs/4517218331 ... though my tests do not see a null pointer.

mertaugh1234 commented 1 year ago

I unfortunately do not have the mental tool kit prepared for debugging this but I don't think I have been able to successfully get past step 2/3 of the "Use with 5eTools JSON data" section. Someone on reddit explained it as just downloading the prebuilt platform, then cloning the 5e tools then running the program with what options I want and the correct output directory. I have not had that experience and I am just trying to figure out where I went wrong. I'll try again on my laptop to see if it's a problem with my PC though.

mertaugh1234 commented 1 year ago

Okay I got it to work on my laptop don't know why it doesn't work on my computer though.