Patches item #3602219, was opened at 2013-01-26 09:33 Message generated for change (Comment added) made by ganz-ru You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3602219...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: Fixed Priority: 5 Private: No Submitted By: Nullzer0 (nu11zer0) Assigned to: xqt (xqt) Summary: Convert relative links to absolute links in linkedPages().
Initial Comment: Convert relative links to absolute links in linkedPages().
----------------------------------------------------------------------
Comment By: GanZ (ganz-ru) Date: 2013-01-27 09:28
Message: After this patch I get an error on any interwiki.py task:
Traceback (most recent call last): File "U:\pywikipedia 4\interwiki.py", line 2589, in <module> main() File "U:\pywikipedia 4\interwiki.py", line 2563, in main bot.run() File "U:\pywikipedia 4\interwiki.py", line 2296, in run self.queryStep() File "U:\pywikipedia 4\interwiki.py", line 2269, in queryStep self.oneQuery() File "U:\pywikipedia 4\interwiki.py", line 2265, in oneQuery subject.batchLoaded(self) File "U:\pywikipedia 4\interwiki.py", line 1328, in batchLoaded (skip, alternativePage) = self.disambigMismatch(page, counter) File "U:\pywikipedia 4\interwiki.py", line 1092, in disambigMismatch if self.originPage.isDisambig() and not page.isDisambig(): File "U:\pywikipedia 4\wikipedia.py", line 1529, in isDisambig for link in disambigpages.linkedPages() File "U:\pywikipedia 4\wikipedia.py", line 2720, in linkedPages if self.namespace() in self.site().namespacesWithSubpage: AttributeError: 'Site' object has no attribute 'namespacesWithSubpage'
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2013-01-27 09:14
Message: is going wrong with "/../" and collections must be imported
----------------------------------------------------------------------
Comment By: Nullzer0 (nu11zer0) Date: 2013-01-27 05:53
Message: Thank you very much. However, r10987 can't deal with the link [[../../]]. I have uploaded a new version that can handle this case. Please reply to me if you have any doubt.
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2013-01-27 02:48
Message: I've done a patch in r10987. Please have a look at this. The right list for some mw projects will come soon.
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2013-01-27 01:42
Message: What is with the article namespace on other projects than "wikipedia"? What about several other namespaces? At the moment not all wikipedia sister projects have subpages on project: and help: namespaces
----------------------------------------------------------------------
Comment By: Nullzer0 (nu11zer0) Date: 2013-01-26 14:58
Message: I should have explained the patch clearer. Sorry.
Relative link is disabled on main namespace of Wikipedia because subpage feature is disabled there (See http://en.wikipedia.org/wiki/Wikipedia:Subpages). For example, on main namespace of Wikipedia, if you write [[/b]] on page "a", it will produce a link to page "/b". However, if you do the same thing on another namespace or another family, it will produce a link to [[a/b]]. I just write the code to simulate this behavior as much as possible.
For os.path problem, I will fix it soon. Thank you for noticing this problem much. :-)
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2013-01-26 11:56
Message: In general a good idea but could you please explain that patch? What is the reason to do that fix outside the wikipedia article namespace only? {the condition is equal to: not (self.site.family.name == "wikipedia" and self.namespace() == 0)}
And btw os.path methods does not work for mediawiki "directories" especial with windows os.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603140&aid=3602219...
pywikipedia-bugs@lists.wikimedia.org