Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error that's easily fixed #27

Open
joshpetit opened this issue Oct 19, 2023 · 2 comments
Open

Error that's easily fixed #27

joshpetit opened this issue Oct 19, 2023 · 2 comments
Assignees

Comments

@joshpetit
Copy link

Hey, I had this error:

Bible to USX v0.07
  This program comes with ABSOLUTELY NO WARRANTY.
  It is free software, and you are welcome to redistribute it under certain conditions.
  See the license in file 'gpl-3.0.txt' for more details.


Bible2USX: processing input folder '/home/joshu/Documents/bibleTranslations/nkjv_official/' …
USXXMLBible: Loading USX_1 books from /home/joshu/Documents/bibleTranslations/nkjv_official/USX_1/…
Loading 66 USX books using 11 processes…
  NOTE: Outputs (including error and warning messages) from loading various books may be interspersed.
Traceback (most recent call last):
  File "/home/joshu/apps/BibleOrgSys/BibleOrgSys/Apps/Bible2USX.py", line 157, in <module>
    run()
  File "/home/joshu/apps/BibleOrgSys/BibleOrgSys/Apps/Bible2USX.py", line 150, in run
    main()
  File "/home/joshu/apps/BibleOrgSys/BibleOrgSys/Apps/Bible2USX.py", line 114, in main
    loadedBible = unknownBible.search( autoLoadAlways=True, autoLoadBooks=True ) # Load all the books if we find any
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joshu/apps/BibleOrgSys/BibleOrgSys/UnknownBible.py", line 843, in search
    if autoLoad: return USXXMLBibleFileCheck( self.givenFolderName, strictCheck=strictCheck, autoLoad=autoLoad, autoLoadBooks=autoLoadBooks )
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joshu/apps/BibleOrgSys/BibleOrgSys/Formats/USXXMLBible.py", line 152, in USXXMLBibleFileCheck
    if autoLoadBooks: uB.loadBooks() # Load and process the book files
                      ^^^^^^^^^^^^^^
  File "/home/joshu/apps/BibleOrgSys/BibleOrgSys/Formats/USXXMLBible.py", line 314, in loadBooks
    self.stashBook( UBB )
  File "/home/joshu/apps/BibleOrgSys/BibleOrgSys/Internals/InternalBible.py", line 965, in stashBook
    assumedBookNames = bookData.getAssumedBookNames()
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joshu/apps/BibleOrgSys/BibleOrgSys/Internals/InternalBibleBook.py", line 2943, in getAssumedBookNames
    results.append( BibleOrgSysGlobals.loadedBibleBooksCodes.getEnglishName_NR( self.BBB ) )
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joshu/apps/BibleOrgSys/BibleOrgSys/Reference/BibleBooksCodes.py", line 756, in getEnglishName_NR
    return self.__DataDicts['referenceAbbreviationDict'][BBB]['bookNameEnglishGuide'].split('/',1)[0].strip()
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'bookNameEnglishGuide'

I went into the BibleBooksCode file and changed line 756 to this:

        return self.__DataDicts['referenceAbbreviationDict'][BBB]['nameEnglish'].split('/',1)[0].strip()

And it was able to export, it seems like the dictionary that it's trying to access looks like this:

{'referenceNumber': 1, 'SBLAbbreviation': 'Gen', 'OSISAbbreviation': 'Gen', 'SwordAbbreviation': 'Gen', 'CCELNumberString': '1', 'USFMAbbreviation': 'Gen', 'USFMNumberString': '01', 'USXNumberString': '001', 'UnboundCodeString': '01O', 'BibleditNumberString': '1', 'NETBibleAbbreviation': 'Gen', 'DrupalBibleAbbreviation': 'Gen', 'ByzantineAbbreviation': None, 'numExpectedChapters': '50', 'possibleAlternativeBooks': None, 'nameEnglish': 'Genesis / 1 Moses', 'typicalSection': 'OT'}

Not sure if this is an error on the files I'm trying to convert or a bug.

@RobH123 RobH123 self-assigned this Oct 19, 2023
@RobH123
Copy link
Contributor

RobH123 commented Oct 19, 2023

Thanks for this. It puzzled me for a while and I can't find any error in the current codebase, so I suspect it might be because the version on PyPI needs updating (that's been on the Todo list for too long).

Just to double-check, can you please tell me how you obtained/downloaded the software? (i.e., did you use something like 'git clone' or did you use PyPI at all?)

@joshpetit
Copy link
Author

I got it through git clone. But I'm not well versed in setting up venvs for python (which I had to do to get it to run) so may be accessing the pypi module not sure. Sorry I can't be of much help haha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants