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 with ESV2011 #4

Closed
psyclone241 opened this issue Jan 6, 2019 · 2 comments
Closed

Error with ESV2011 #4

psyclone241 opened this issue Jan 6, 2019 · 2 comments

Comments

@psyclone241
Copy link

psyclone241 commented Jan 6, 2019

Hey Jake, just recently found your project that uses pysword to generate JSON from the sword files. I ran into this error and wondered if you'd seen it before? I'm going to download the pysword code and see what I can find, but thought I'd also ask, just in case it was a known issue.

I am using Python 3.7.1, just in case that has bearing, but I tried it in Python 2.7 as well. I'm running a virtualenv to do this.

Sorry forgot to note. I had to install the package future. Not trying to be a pain, but a requirements.txt file for your required libs, which is only 2, but that way you could keep a list and people could just pip install -r requirements.txt.

Anyway, thank you so much for this project. I greatly appreciate seeing these out there. The digital Bible is just as powerful as the paper Bible. Still the Word of God!

ANYWAY! So here is the bug I ran into. Like I said, I'm also going to start with seeing where it is failing in pysword.

  • python sword_to_json.py --source_file ./modules/ESV2011/ESV2011.zip --bible_version ESV2011 --output_file ./modules/ESV2011/esv2011.json

Traceback (most recent call last):
File "sword_to_json.py", line 56, in
if name == "main": main()
File "sword_to_json.py", line 53, in main
bible_dict = generate_dict(args.source_file, args.bible_version)
File "sword_to_json.py", line 27, in generate_dict
'text': bible.get(books=[book.name], chapters=[chapter], verses=[verse])
File "/Users/rkeyes/git/personal/SWORD-to-JSON/venv/lib/python3.7/site-packages/pysword/bible.py", line 208, in get
output.extend(list(self.get_iter(books=books, chapters=chapters, verses=verses, clean=clean)))
File "/Users/rkeyes/git/personal/SWORD-to-JSON/venv/lib/python3.7/site-packages/pysword/bible.py", line 189, in get_iter
text = self._text_for_index(testament, idx)
File "/Users/rkeyes/git/personal/SWORD-to-JSON/venv/lib/python3.7/site-packages/pysword/bible.py", line 334, in _text_for_index
uncompressed_text = self._uncompressed_text(testament, buf_num)
File "/Users/rkeyes/git/personal/SWORD-to-JSON/venv/lib/python3.7/site-packages/pysword/bible.py", line 355, in _uncompressed_text
return zlib.decompress(compressed_data)
zlib.error: Error -3 while decompressing data: incorrect header check

@psyclone241
Copy link
Author

Not sure what the difference was, but I cloned the pysword repo and ran it locally with your script instead of installing it, and it converted the ESV2011 file. Possible version difference than what they have in the pip repo. Not sure yet.... I'll let you know when I figure it out.

@psyclone241
Copy link
Author

psyclone241 commented Jan 7, 2019

Ok, got a response from the pysword dev. The fix is already in the current codebase, but has not been re-deployed to the PIP service. So, you can close the issue.

@wasdin wasdin closed this as completed Oct 7, 2019
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