Not able to use option parser to run script in CMD after setup

Open
#115 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
cli

Research direction

Start by comparing the installation and entry-point configuration in setup.py with the direct invocation of wikiextractor.py shown in the report. Reproduce the Windows command from the Wikidump directory and verify that the installed script receives enwiki-pages-articles.xml.bz2 as its input; done means the installed invocation parses that argument without reporting that input is missing.

Written by the indexing model from the issue text.

Description

After "git clone" all the files, when I invoke the script directly, It worked just fine

C:\Users\User\Documents\GitHub\wikiextractor>python wikiextractor.py enwiki-pages-articles.xml.bz2

I also want to install it (by running the setup.py provided) and use it in other directory.
After I successfully install wikiextractor, I cd to the directory with the same file (enwiki-pages-articles.xml.bz2) and try to run the script again.

C:\Users\User\Desktop\Wikidump>wikiextractor.py enwiki-pages-articles.xml.bz2

The following error message appears.

usage: WikiExtractor.py [-h] [-o OUTPUT] [-b n[KMG]] [-c] [--json] [--html]
                    [-l] [-s] [--lists] [-ns ns1,ns2]
                    [--templates TEMPLATES] [--no-templates] [-r]
                    [--min_text_length MIN_TEXT_LENGTH]
                    [--filter_disambig_pages] [-it abbr,b,big]
                    [-de gallery,timeline,noinclude] [--keep_tables]
                    [--processes PROCESSES] [-q] [--debug] [-a] [-v]
                    input
WikiExtractor.py: error: the following arguments are required: input

Why could this happen?
I hope I explain everything clear.

Dominant language
Python
Stars
4k
Forks
1k
Avg merge
1m
Merged PRs (30d)
10

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WikiExtractor/wikiextractor

All issues in WikiExtractor/wikiextractor

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.