schierlm / BibleMultiConverter

Converter written in Java to convert between different Bible program formats
Other
124 stars 33 forks source link

Importing MyBible format fails on a title from stories table(?) #14

Closed n9yty closed 6 years ago

n9yty commented 6 years ago

I have another text that won't import, it complains about this:

Exception in thread "main" java.lang.IllegalArgumentException: text is invalid: Иисус говорит о Своей смерти at biblemulticonverter.data.Utils.validateString(Utils.java:32) at biblemulticonverter.data.FormattedText$Text.(FormattedText.java:206) at biblemulticonverter.data.FormattedText$Text.(FormattedText.java:202) at biblemulticonverter.data.FormattedText$AppendVisitor.visitText(FormattedText.java:681) at biblemulticonverter.sqlite.format.MyBibleZone.doImport(MyBibleZone.java:334) at biblemulticonverter.Main.main(Main.java:61)

I don't know why that text is invalid, i found it in the title field in the stories table.

If I drop the stories table, it will convert fine. However, even if I keep the stories table and delete the eight (8) lines where this title is used, it still won't import, still complains about the same text string, which I can't find anywehre else, it is not in the verses text or any other table in the sqlite3 file that I can find.

I was able to do an SQLiteDump of that file, and had no errors, and cannot find the text in that file. I was trying to convert to Accordance, but cannot do Diffable or Compact either

I wish I could do more to give a better report, but I can't find the text anywhere else nor do I see any options to give better output as to where it is finding that.

schierlm commented 6 years ago

Yes, sorry, that error message is not the best one :-(

You are right, the error is in the stories table, and there are probably some control characters (or multiple spaces) between Иисус and говорит о Своей смерти which makes the text invalid for export.

I'd suggest to search for only the second part of the text in the SQLiteDump file (or in your SQLite viewer).

You can also send me the import file and I can have a look how to fix it.

n9yty commented 6 years ago

I should have not assumed that the line wrap was due to some internal column width... It was exactly as printed, a line break after Иисус. I fixed the SQLite3 DB and all is fine. But since I am going to Accordance format, I don't think it uses the Stories headers at all, so it didn't matter for my case in the end. Nice to know what the problem is, though, and be able to fix it in my source data. Thanks!!