Skip to content

Avoiding Overflow Error when Building Index on Windows  #7

@greenguy33

Description

@greenguy33

Thank you for this great library, I have found it very useful!

If I run the build index command as specified in the README on Windows using the library binaries, I encounter the following error:
OverflowError: Python int too large to convert to C long
Here are steps I took to run the program on Windows:

  1. Clone the repository locally
  2. In cli.py, add this code so it can be run as a standalone Python program:
if __name__ == "__main__":
    main()
  1. In cli.py, change the import to use the local version of processor.py:
from wikimapper import download_wikidumps, WikiMapper
from processor import create_index
  1. In processor.py, comment out line 117:
#csv.field_size_limit(sys.maxsize)

Then you can run the code locally in this way:

cli.py create enwiki-latest --dumpdir data --target data/index_enwiki-latest.db

Hope it helps someone!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions