Last modified: 2014-09-02 08:37:25 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 T62042, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60042 - Problem with uploading files
Problem with uploading files
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: High normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on: 68645
Blocks: pwb_script_tests
  Show dependency treegraph
 
Reported: 2014-01-14 15:58 UTC by Ivailo Stoianov
Modified: 2014-09-02 08:37 UTC (History)
5 users (show)

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


Attachments

Description Ivailo Stoianov 2014-01-14 15:58:30 UTC
Getting:
ERROR: Upload error: 
Traceback (most recent call last):
  File "scripts/upload.py", line 214, in upload_image
    ignore_warnings=self.ignoreWarning)
  File "/root/mybot/core/pywikibot/site.py", line 3246, in upload
    raise ValueError("APISite.upload: cannot upload file without "
ValueError: APISite.upload: cannot upload file without a summary/description.

Even with -noverify I get the same error. And if I try to change the desc I get: Could not load GUI modules: No module named gui   and the error from above!
Comment 1 xqt 2014-01-14 16:13:27 UTC
Neither there is a standard module gui nor an external library is included in the framework.
Comment 2 John Mark Vandenberg 2014-07-27 00:12:29 UTC
Regarding gui, that is bug 68645.  You can set 'editor=vi' in your config to work around that bug, or 'editor=notepad' for Windows users :P.
Comment 3 John Mark Vandenberg 2014-08-04 03:58:36 UTC
It definitely needs to provide a nicer set of errors.  If Site.upload() requires a summary, then upload.py should get one from the user before calling Site.upload()

$ python pwb.py -family:wikidata -lang:wikidata scripts/upload.py
No input filename given
File or URL where image is now: blahblah.png
The filename on the target wiki will default to: blahblah.png
Enter a better name, or press enter to accept: 
The suggested description is:

Do you want to change this description? ([y]es, [N]o) y
Could not load GUI modules: No module named gui
Uploading file to wikidata:wikidata via API....
Reading file blahblah.png
ERROR: Upload error: 
Traceback (most recent call last):
  File "scripts/upload.py", line 216, in upload_image
    ignore_warnings=self.ignoreWarning)
  File ".../pywikibot/site.py", line 3399, in upload
    raise ValueError("APISite.upload: cannot upload file without "
ValueError: APISite.upload: cannot upload file without a summary/description.
Comment 4 Mpaa 2014-08-30 20:11:33 UTC
Patch: https://gerrit.wikimedia.org/r/#/c/157355/
Comment 5 Mpaa 2014-09-02 08:18:58 UTC
Patch: https://gerrit.wikimedia.org/r/#/c/157355/ merged.

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


Navigation
Links