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

mwrefs should register mediawiki-utilities as a dependency #13

Open
harej opened this issue Sep 13, 2017 · 1 comment
Open

mwrefs should register mediawiki-utilities as a dependency #13

harej opened this issue Sep 13, 2017 · 1 comment

Comments

@harej
Copy link

harej commented Sep 13, 2017

I installed mwrefs via pip and then tried to use it:

Norepinephrine:scripts jh$ mwrefs extract -h
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mwcli/router.py", line 49, in main
    package=self.package_name)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mwrefs/utilities/extract.py", line 24, in <module>
    from mw import xml_dump
ModuleNotFoundError: No module named 'mw'
Could not load utility extract.

Then after installing mediawiki-utilities...

Norepinephrine:scripts jh$ mwrefs extract -h
Extracts reference tags from Wikipedia XML database dumps.

Generates a TSV dataset with one row per revision with the following fields.

* page_id
* page_title
* rev_id
* rev_timestamp
* ref_tag

Usage:
    extract -h | --help
    extract <dump-file>...

Options:
    -h --help    Prints this documentation
    <dump-file>  Path to a set of XML dumps files (pages meta history)
Norepinephrine:scripts jh$ 

This leads me to believe that mediawiki-utilities is not properly registered as a dependency in mwrefs.

@halfak
Copy link
Member

halfak commented Sep 20, 2017

Right. This should switch entirely over to using mwxml rather than mediawiki-utilities.

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