Last modified: 2013-10-14 14:15: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 T57610, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55610 - time data error
time data error
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
compat-(1.0)
All All
: Highest critical
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-11 09:04 UTC by JAn Dudík
Modified: 2013-10-14 14:15 UTC (History)
1 user (show)

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


Attachments

Description JAn Dudík 2013-10-11 09:04:40 UTC
After last update via SVN bot does not work, see example


D:\Py>replace.py -start:! "foo" "bar"
Sleeping for 3.9 seconds, 2013-10-11 11:01:19
Getting 60 pages from wikipedia:cs...
ERROR: SaxParseBug caused error ValueError: time data u'20130318134509' does not
 match format '%Y-%m-%dT%H:%M:%SZ'
. Dump SaxParseBug_wikipedia-cs__Fri_Oct_11_11-01-30_2013.dump created.
Traceback (most recent call last):
  File "D:\Py\pagegenerators.py", line 1228, in __iter__
    for loaded_page in self.preload(somePages):
  File "D:\Py\pagegenerators.py", line 1253, in preload
    pywikibot.getall(site, pagesThisSite)
  File "D:\Py\wikipedia.py", line 5508, in getall
    _GetAll(site, pages, throttle, force).run()
  File "D:\Py\wikipedia.py", line 5158, in run
    xml.sax.parseString(data, handler)
  File "C:\Python27\lib\xml\sax\__init__.py", line 49, in parseString
    parser.parse(inpsrc)
  File "C:\Python27\lib\xml\sax\expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "C:\Python27\lib\xml\sax\xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "C:\Python27\lib\xml\sax\expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "C:\Python27\lib\xml\sax\expatreader.py", line 304, in end_element
    self._cont_handler.endElement(name)
  File "D:\Py\xmlreader.py", line 207, in endElement
    self.callback(entry)
  File "D:\Py\wikipedia.py", line 5194, in oneDone
    page2._editTime = parsetime2stamp(timestamp)
  File "D:\Py\wikipedia.py", line 9685, in parsetime2stamp
    s = time.strptime(tz, "%Y-%m-%dT%H:%M:%SZ")
  File "C:\Python27\lib\_strptime.py", line 454, in _strptime_time
    return _strptime(data_string, format)[0]
  File "C:\Python27\lib\_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data u'20130318134509' does not match format '%Y-%m-%dT%H:%M:%S
Z'
time data u'20130318134509' does not match format '%Y-%m-%dT%H:%M:%SZ'
0 pages were changed.

D:\Py>version.py
git není názvem vnitřního ani vnějšího příkazu,
spustitelného programu nebo dávkového souboru.
Pywikipedia wikipedia.py (r-1 (unknown), 080ceeb, 2013/10/11, 10:26:03, OUTDATED
)
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok

D:\Py>
Comment 1 JAn Dudík 2013-10-11 09:08:24 UTC
When I go back from SVN revision 10320 to 10319, it works
Comment 2 xqt 2013-10-11 09:27:31 UTC
It's a mess with these timestamps. Without that patch other scripts failed after end of september or beginning of october. Seems mw interface has been changend somewhere.
Comment 3 xqt 2013-10-11 09:29:07 UTC
see also bug 55399
Comment 4 xqt 2013-10-11 09:33:50 UTC
SVN r10320 is https://gerrit.wikimedia.org/r/88235
Comment 5 Gerrit Notification Bot 2013-10-11 19:23:39 UTC
Change 89322 had a related patch set uploaded by Mpaa:
Bug 55610 - time data error

https://gerrit.wikimedia.org/r/89322
Comment 6 Gerrit Notification Bot 2013-10-12 10:09:19 UTC
Change 89322 merged by Xqt:
Bug 55610 - time data error

https://gerrit.wikimedia.org/r/89322

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


Navigation
Links