Last modified: 2014-09-09 02:23:05 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 T57205, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55205 - upload.py error with Wikia.com
upload.py error with Wikia.com
Status: NEW
Product: Pywikibot
Classification: Unclassified
Other scripts (Other open bugs)
compat-(1.0)
All All
: Normal normal
: ---
Assigned To: Pywikipedia bugs
python272
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:43 UTC by Kunal Mehta (Legoktm)
Modified: 2014-09-09 02:23 UTC (History)
1 user (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:43:32 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1424/
Reported by: Anonymous user
Created on: 2012-03-18 17:47:08
Subject: upload.py error with Wikia.com
Original description:
P:\pywikipedia>python  version.py
Pywikipedia \[http\] trunk/pywikipedia \(r10023, 2012/03/17, 18:03:32\)
Python 2.7.2 \(default, Jun 12 2011, 14:24:46\) \[MSC v.1500 64 bit \(AMD64\)\]
config-settings:
use\_api = True
use\_api\_login = True
unicode test: ok

P:\pywikipedia>python upload.py wikih.jpg
WARNING: Your account on sxerks:en does not have a bot flag. Its edits will be v
isible in the recent changes and it may get blocked.
Reading file wikih.jpg
The filename on the target wiki will default to: wikih.jpg
Enter a better name, or press enter to accept:
The suggested description is:

Do you want to change this description? \(\[y\]es, \[N\]o\) n
Uploading file to sxerks:en via API....
'ascii' codec can't decode byte 0xff in position 622: ordinal not in range\(128\)
WARNING: Could not open 'http://sxerks.wikia.com/api.php'. Maybe the server or
your connection is down. Retrying in 1 minutes...
Traceback \(most recent call last\):
File "upload.py", line 472, in <module>
main\(\)
File "upload.py", line 468, in main
bot.run\(\)
File "upload.py", line 440, in run
return self.upload\_image\(\)
File "upload.py", line 282, in upload\_image
data = query.GetData\(params, self.targetSite\)
File "P:\pywikipedia\query.py", line 137, in GetData
site.cookies\(sysop=sysop\)
File "P:\pywikipedia\upload.py", line 46, in post\_multipart
cookies=cookies\)
File "P:\pywikipedia\wikipedia.py", line 5497, in postData
time.sleep\(retry\_idle\_time \* 60\)
KeyboardInterrupt
Comment 1 Kunal Mehta (Legoktm) 2013-10-05 04:43:34 UTC
This is not a Pywikipedia error, this is a connection error, try again later.
It clearly states: "Could not open 'http://sxerks.wikia.com/api.php'. Maybe the server or your connection is down."

The line before it may be an encoding error of the network error message itself, see bug\#3153555 at 
https://sourceforge.net/tracker/?func=detail&aid=3153555&group\_id=93107&atid=603138. I suppose you have a non-English environment on your computer.

We have nothing to do with wikia server or your network connection.
Comment 2 Kunal Mehta (Legoktm) 2013-10-05 04:43:36 UTC
Even in that case, we should not display that message. And a network error message that's 622 characters long? Really?

The "WARNING: Could not open 'http://sxerks.wikia.com/api.php'. Maybe the server or your connection is down" displays on \*any\* error in the connection, which could still very well be on our part.
Comment 3 Kunal Mehta (Legoktm) 2013-10-05 04:43:38 UTC
The other bug you refer to is unrelated; that one cast a new exception within the exception handler that prints the "WARNING..." string.
Comment 4 Kunal Mehta (Legoktm) 2013-10-05 04:43:40 UTC
I talk to Wikia and another user tested an upload and it work just fine.  The difference being they were using python 2.6.5.  I then found an older 2.6.5 windows installer and tried myself and it worked.

So apparently there is something wrong with the interaction with 2.7.2 and upload.py that is causing this error.
Comment 5 Kunal Mehta (Legoktm) 2013-10-05 04:43:41 UTC
Possibly related to https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3160376&group\_id=93107

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


Navigation
Links