Last modified: 2014-09-13 04:49:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70611, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68611 - Running data_ingestion.py depends on tests/data/csv_ingestion.csv
Running data_ingestion.py depends on tests/data/csv_ingestion.csv
Status: NEW
Product: Pywikibot
Classification: Unclassified
Other scripts (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks: pwb_script_tests
  Show dependency treegraph
 
Reported: 2014-07-26 10:05 UTC by John Mark Vandenberg
Modified: 2014-09-13 04:49 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description John Mark Vandenberg 2014-07-26 10:05:00 UTC
Running data_ingestion requires the file 'tests/data/csv_ingestion.csv' relative to CWD, which doesnt exist except when the bot operator is calling the script whilst CWD is the scripts directory.

$ python pwb.py scripts/data_ingestion.py
Traceback (most recent call last):
  File "pwb.py", line 157, in <module>
    run_python_file(fn, argv, argvu)
  File "pwb.py", line 67, in run_python_file
    exec(compile(source, filename, "exec"), main_mod.__dict__)
  File "scripts/data_ingestion.py", line 144, in <module>
    reader = CSVReader(open('tests/data/csv_ingestion.csv'), 'url')
IOError: [Errno 2] No such file or directory: 'tests/data/csv_ingestion.csv'
<type 'exceptions.IOError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

There is a test, which isnt run as part of the test suite:
scripts/tests/test_data_ingestion.py

And the data file does exist as:
scripts/tests/data/csv_ingestion.csv
Comment 1 Travis Briggs 2014-08-05 01:12:09 UTC
I'd like to work on this bug. Do you have instructions on how to run the failing test?
Comment 2 Gerrit Notification Bot 2014-08-06 04:27:02 UTC
Change 151997 had a related patch set uploaded by Audiodude:
data_ingestion.py: Fix data path to be relative to script.

https://gerrit.wikimedia.org/r/151997

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links