Bugs item #1802115, was opened at 2007-09-25 17:25 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1802115...
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: General Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: jmdg (jmduarte) Assigned to: Nobody/Anonymous (nobody) Summary: upload.py doesn't work when used with local file
Initial Comment: I am trying uploading an image to my wiki with:
python upload.py -keep -noverify /project/pics/2plz.jpg 2plz
But fails with:
--- /project/pics/2plz.jpg Checked for running processes. 1 processes currently running, including the current process. Getting a page to check if we're logged in on pdbwiki:en Reading file /project/pics/2plz.jpg The suggested description is: 2plz Uploading file to pdbwiki:en... Traceback (most recent call last): File ".../pywikipedia/upload.py", line 323, in <module> main(sys.argv[1:]) File ".../pywikipedia/upload.py", line 319, in main bot.run() File ".../pywikipedia/upload.py", line 295, in run return self.upload_image() File ".../pywikipedia/upload.py", line 242, in upload_image (('wpUploadFile', encodedFilename, self._contents),), AttributeError: UploadRobot instance has no attribute '_contents' ---
So looks like _contents from UploadRobot was not initialised. Having a look at the code it looks like there is a typo in line 157 (a missing dot after self): self_contents = file.read()
Could you commit the fix to svn?
Cheers
Jose
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1802115...