Bugs item #1915362, was opened at 2008-03-16 11:54 Message generated for change (Comment added) made by cosoleto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1915362...
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: category
Group: None
Status: Closed Resolution: Fixed
Priority: 5 Private: No Submitted By: Bernhard Mayr (falk_steinhauer) Assigned to: Nobody/Anonymous (nobody) Summary: IOError in "category.py tree"
Initial Comment: Line 748 of category.py must be changed from if not os.path.isabs(filename): to if not os.path.isabs(filename) and filename:
Otherwise the call of "category.py tree" would lead to an IOError when the tree should be printed to stdout (see output below).
C:\Python\pywikipedia>category.py tree Checked for running processes. 1 processes currently running, including the current process. For which category do you want to create a tree view? inoffiziell Please enter the name of the file where the tree should be saved, or press enter to simply show the tree: Getting [[Kategorie:Inoffiziell]]... Getting [[Kategorie:Alternatives Aventurien]]...
...and so on...
Getting [[Kategorie:Inoffizieller Index]]... Saving results in C:\Python\pywikipedia Dumping to category.dump.bz2, please wait... Traceback (most recent call last): File "C:\Python\pywikipedia\category.py", line 933, in <module> bot.run() File "C:\Python\pywikipedia\category.py", line 826, in run f = codecs.open(self.filename, 'a', 'utf-8') File "C:\Python\lib\codecs.py", line 817, in open file = __builtin__.open(filename, mode, buffering) IOError: [Errno 13] Permission denied: 'C:\Python\pywikipedia'
Here you can see, that "filename" is the name of a folder, not a file. Opening a folder for writing is not possible.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-06-10 14:54
Message: Logged In: YES user_id=181280 Originator: NO
Applied in r5551. Thank you.
----------------------------------------------------------------------
Comment By: Daniel Herding (wikipedian) Date: 2008-04-23 23:55
Message: Logged In: YES user_id=880694 Originator: NO
Without looking why the script crashes: is "category.py tree" really still needed, now that MediaWiki can show such a tree itself via AJAX?
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1915362...