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

Exception: invalid data, magic number is not correct #5

Open
ghost opened this issue Apr 22, 2021 · 4 comments
Open

Exception: invalid data, magic number is not correct #5

ghost opened this issue Apr 22, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 22, 2021

  • spikex 0.5.0:
  • Python 3.6:
  • Windows 10:

Description

Hi i installed spikex and downloaded enwiki_core. However when i try to load enwiki_core :

from spikex.wikigraph import load as wg_load
from spikex.pipes import WikiPageX

# load a WikiGraph
wg = wg_load('enwiki_core')

I am getting the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\local\Pathways\nicepaths\lib\site-packages\spikex\wikigraph\wikigraph.py", line 41, in load
    return WikiGraph.load(data_path, meta)
  File "C:\local\Pathways\nicepaths\lib\site-packages\spikex\wikigraph\wikigraph.py", line 81, in load
    wg._wpd = WikiPageDetector.load(data_path)
  File "C:\local\Pathways\nicepaths\lib\site-packages\spikex\wikigraph\wikigraph.py", line 180, in load
    wpd._trie = Trie.from_buff(mmap(bf.fileno(), 0), copy=False)
  File "lib\cyac\trie.pyx", line 1086, in cyac.trie.Trie.from_buff
  File "lib\cyac\trie.pyx", line 1103, in cyac.trie.trie_from_buff
Exception: invalid data, magic number is not correct

cyac version is 1.3 (last one)
Any ideas please?

@chenkovsky
Copy link

how was 'enwiki_core' built? maybe it's built by old version cyac.

@chenkovsky
Copy link

there is a bug, in from_buff of old version cyac.

@paoloq
Copy link
Contributor

paoloq commented May 20, 2021

@MLAlex1, a new enwiki_core version has been released. Could you please try to see if that error happens again?

@callumhedemann
Copy link

callumhedemann commented Mar 30, 2022

Hi I am getting the exact same error - I have tried with the latest enwiki_core and also built my own enwiki_core using the spikex create-wikigraph command.

cyac version 1.4,
cython version 0.29.28,
python version 3.7.3,
Spacy version 3.2.3
spikex version 0.5.2

Edit: A fresh venv with only the above libraries fixed the problem

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

3 participants