Last modified: 2014-10-29 12:37:11 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 T74669, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72669 - importerror catlib for interwiki.py
importerror catlib for interwiki.py
Status: RESOLVED INVALID
Product: Pywikibot
Classification: Unclassified
interwiki.py (Other open bugs)
core-(2.0)
All All
: Unprioritized critical
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-29 11:03 UTC by JAn Dudík
Modified: 2014-10-29 12:37 UTC (History)
2 users (show)

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


Attachments

Description JAn Dudík 2014-10-29 11:03:47 UTC
D:\Py\rewrite>pwb.py interwiki -family:wiktionary -cleanup -start:category:Finština -array:50 -query:30 -untranslated

Traceback (most recent call last):
  File "D:\Py\rewrite\pwb.py", line 178, in <module>
    run_python_file(fn, argv, argvu)
  File "D:\Py\rewrite\pwb.py", line 75, in run_python_file
    exec(compile(source, filename, "exec"), main_mod.__dict__)
  File "interwiki.py", line 357, in <module>
    from pywikibot import catlib
ImportError: cannot import name catlib
<type 'exceptions.ImportError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

D:\Py\rewrite>
Comment 1 Fabian 2014-10-29 11:16:59 UTC
That doesn't make sense. I can't find any catlib reference in the current version of the repository:

https://github.com/wikimedia/pywikibot-core/search?utf8=%E2%9C%93&q=catlib

As you can see also line 357 doesn't contain a catlib entry:

https://github.com/wikimedia/pywikibot-core/blob/master/scripts/interwiki.py#L357
Comment 2 Merlijn van Deen (test) 2014-10-29 11:21:37 UTC
That statement:
1) never has existed in core, as catlib doesn't exist there,
2) has been removed in compat in this revision: https://github.com/wikimedia/pywikibot-compat/commit/fcaa349e54e7850e555b878d7b9f5aa0b6edbd7c

So you probably copied an ancient revision of compat interwiki.py into d:\py\rewrite or d:\py\rewrite\scripts.
Comment 3 Fabian 2014-10-29 11:57:06 UTC
A bit of nitpick: In core is a catlib.py in pywikibot/compat/catlib.py. But it is just there for backwards compatibility and isn't used by anything (git grep catlib).
Comment 4 JAn Dudík 2014-10-29 12:37:11 UTC
(In reply to Merlijn van Deen from comment #2)
> That statement:
> 1) never has existed in core, as catlib doesn't exist there,
> 2) has been removed in compat in this revision:
> https://github.com/wikimedia/pywikibot-compat/commit/
> fcaa349e54e7850e555b878d7b9f5aa0b6edbd7c
> 
> So you probably copied an ancient revision of compat interwiki.py into
> d:\py\rewrite or d:\py\rewrite\scripts.

I found duplicate old interwiki.py in the same directory as pwb.py - bot takes this first instead of scripts/interwiki.py 

Now I can run script, but  some new errors.

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


Navigation
Links