Skip to content

A way to use without load bibles #173

Closed

Description

@paulocoutinhox

Hi,

I want use only the parser part of this library but instead of ti, it is loading all the bible data and my server is crashing because of memory amount:

avinuteologia-1   |     import pythonbible as pb
avinuteologia-1   |   File "/usr/local/lib/python3.10/site-packages/pythonbible/__init__.py", line 30, in <module>
avinuteologia-1   |     from .formatter import format_scripture_references
avinuteologia-1   |   File "/usr/local/lib/python3.10/site-packages/pythonbible/formatter.py", line 8, in <module>
avinuteologia-1   |     from pythonbible.bible.bibles import get_bible
avinuteologia-1   |   File "/usr/local/lib/python3.10/site-packages/pythonbible/bible/bibles.py", line 5, in <module>
avinuteologia-1   |     import pythonbible.bible.asv.html as asv_html
avinuteologia-1   |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
avinuteologia-1   |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
avinuteologia-1   |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
avinuteologia-1   |   File "<frozen importlib._bootstrap_external>", line 879, in exec_module
avinuteologia-1   |   File "<frozen importlib._bootstrap_external>", line 975, in get_code
avinuteologia-1   |   File "<frozen importlib._bootstrap_external>", line 1074, in get_data
avinuteologia-1   | MemoryError

Good job :)

Activity

  1. self-assigned this
    on Jul 30, 2024
  2. linked a pull request that will close this issueMore en version texts #165on Jul 30, 2024
  3. avendesora commented on Jul 30, 2024

    @avendesora
    Owner

    I'm hoping that the draft PR that I linked to this issue will fix this. It introduces lazy-loading of the version texts (along with a lot more versions), and should be more memory-efficient as long as you aren't actually looking up the text from multiple versions all at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestwork in progressPull request created but development is not yet finished

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions