gambolputty/wiktionary-de-parser

Issues when using the library.

revione opened this issue · 2 comments

After installing the library with pip, the following problem has arisen.

Installation:

pip install wiktionary-de-parser

Code:

from wiktionary_de_parser import WiktionaryParser
from wiktionary_de_parser.dump_processor import WiktionaryDump

# To download the dump file, specify the directory where the
# dump file should be stored.
dump = WiktionaryDump(dump_dir_path="directory-of-dump-file")

# This will download "dewiktionary-latest-pages-articles-multistream.xml.bz2" to
# the directory specified in `dump_dir_path`.
dump.download_dump()

Comand line:

Traceback (most recent call last):
  File "wp.py", line 1, in <module>
    from wiktionary_de_parser import WiktionaryParser
ImportError: cannot import name 'WiktionaryParser' from 'wiktionary_de_parser' (venv/lib/python3.9/site-packages/wiktionary_de_parser/__init__.py)

@revione I can see you are running it with Python 3.9 (the 'venv/lib/python3.9'-path in the error message). Can you try running it with a Python version higher than 3.9?

This package is for Python 3.11+ as stated in the Readme.

Yes, I was running an older version. Now I'm running it with the latest version, and it's working fine. Thank you @gambolputty !