jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: pywikibot-core.
jayvdb changed Security from none to none.
TASK DESCRIPTION
Probably caused by revision deletion of the page?
https://travis-ci.org/wikimedia/pywikibot-core/jobs/43590174
```
======================================================================
ERROR: testLogEvents (tests.site_tests.SiteUserTestCase)
Test the site.logevents() method.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/wikimedia/pywikibot-core/tests/site_tests.py", line 732, in testLogEvents
for entry in mysite.logevents(logtype=typ, total=3):
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py", line 1512, in __iter__
yield self.result(item)
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/data/api.py", line 1710, in result
return self.entryFactory.create(pagedata)
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 294, in create
return self._creator(logdata)
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 283, in <lambda>
self._creator = lambda data: logclass(data, self._site)
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 98, in __init__
pos = self.data['title'].find('#')
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 28, in __missing__
raise KeyError("Log entry has no '%s' key" % key, key)
KeyError: ("Log entry has no 'title' key", 'title')
```
TASK DETAIL
https://phabricator.wikimedia.org/T78152
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, jayvdb, pywikipedia-bugs
jayvdb created this task.
jayvdb added a subscriber: jayvdb.
jayvdb added a project: Pywikibot-tests.
jayvdb changed Security from none to none.
TASK DESCRIPTION
https://travis-ci.org/wikimedia/pywikibot-core/jobs/43953898
```
======================================================================
ERROR: test_logevents_default (tests.pagegenerators_tests.TestLogeventsFactoryGenerator)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/wikimedia/pywikibot-core/tests/pagegenerators_tests.py", line 414, in test_logevents_default
pages = set(gen)
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/pagegenerators.py", line 726, in LogeventsPageGenerator
yield entry.title()
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 63, in title
self._title = pywikibot.Page(self.site, self.data['title'])
File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/logentries.py", line 28, in __missing__
raise KeyError("Log entry has no '%s' key" % key, key)
KeyError: ("Log entry has no 'title' key", 'title')
```
TASK DETAIL
https://phabricator.wikimedia.org/T78481
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: Aklapper, jayvdb, pywikipedia-bugs
Xqt created this task.
Xqt added a subscriber: Xqt.
Xqt added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
```
C:\pwb\core>pwb.py redirect double -moves -total:950 -always -lang:sv
Retrieving 950 moved pages via API...
.........................WARNING: C:\pwb\core\pywikibot\family.py:914: FamilyMai
ntenanceWarning: Family name wikimediachapter does not match family module name
wikimedia
................................................................................
.....................
>>> Användare:EnDumEn/Test2 <<<
Links to: [[Användare:EnDumEn/Test]].
Skipping: Redirect target [[Användare:EnDumEn/Test]] is not a redirect.
..............................................................Traceback (most recent call last):
File "C:\pwb\core\pwb.py", line 213, in <module>
run_python_file(filename, argv, argvu, file_package)
File "C:\pwb\core\pwb.py", line 82, in run_python_file
main_mod.__dict__)
File ".\scripts\redirect.py", line 794, in <module>
main()
File ".\scripts\redirect.py", line 791, in main
bot.run()
File ".\scripts\redirect.py", line 690, in run
self.fix_double_redirects()
File ".\scripts\redirect.py", line 520, in fix_double_redirects
for redir_name in self.generator.retrieve_double_redirects():
File ".\scripts\redirect.py", line 294, in retrieve_double_redirects
for redir_page in gen:
File ".\scripts\redirect.py", line 342, in get_moved_pages_redirects
moved_page = logentry.title()
File "C:\pwb\core\pywikibot\logentries.py", line 64, in title
self._title = pywikibot.Page(self.site, self.data['title'])
File "C:\pwb\core\pywikibot\logentries.py", line 28, in __missing__
raise KeyError("Log entry (%s) has no '%s' key" % (self._type, key))
KeyError: u"Log entry (move) has no 'title' key"
<type 'exceptions.KeyError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
```
TASK DETAIL
https://phabricator.wikimedia.org/T94349
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: pywikipedia-bugs, Xqt, Aklapper, jayvdb
XZise created this task.
XZise added a subscriber: XZise.
XZise added projects: pywikibot-core, Pywikibot-tests.
TASK DESCRIPTION
I installed a new version of Python and forgot to install `six`. Now when I did `python setup.py test` I got:
```
xzise@localhost:~/Programms/core$ python setup.py test
running test
running egg_info
writing pywikibot.egg-info/PKG-INFO
writing dependency_links to pywikibot.egg-info/dependency_links.txt
writing top-level names to pywikibot.egg-info/top_level.txt
writing requirements to pywikibot.egg-info/requires.txt
reading manifest file 'pywikibot.egg-info/SOURCES.txt'
writing manifest file 'pywikibot.egg-info/SOURCES.txt'
running build_ext
max_retries reduced from 10 to 1 for tests
Disabled test modules (to run: python -m unittest ...):
ui
Extra test modules (run after library, before scripts):
exceptions, thread, timestamp, tk, wikistats
Skipping tests (to run: python -m unittest ...):
{'textlib': ['test_interwiki_format']}
Traceback (most recent call last):
File "setup.py", line 127, in <module>
use_2to3=False
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/test.py", line 138, in run
self.with_project_on_sys_path(self.run_tests)
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/test.py", line 118, in with_project_on_sys_path
func()
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/site-packages/setuptools/command/test.py", line 164, in run_tests
testLoader = cks
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/main.py", line 92, in __init__
self.parseArgs(argv)
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/main.py", line 139, in parseArgs
self.createTests()
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/main.py", line 146, in createTests
self.module)
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/loader.py", line 146, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/loader.py", line 146, in <listcomp>
suites = [self.loadTestsFromName(name, module) for name in names]
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/loader.py", line 131, in loadTestsFromName
test = obj()
File "/home/xzise/Programms/core/tests/__init__.py", line 159, in collector
discovered = loader.loadTestsFromName(module_class_name)
File "/home/xzise/.pyenv/versions/3.4.2/lib/python3.4/unittest/loader.py", line 114, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'textlib_tests'
<class 'AttributeError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
```
But obviously the file was there. Luckily I remembered someone had the same problem I could look into my IRC log and found that I suggested to do `python pwb.py tests/textlib_tests.py` and only then I got the actual error:
```
xzise@localhost:~/Programms/core$ python pwb.py tests/textlib_tests.py
max_retries reduced from 10 to 1 for tests
Traceback (most recent call last):
File "pwb.py", line 221, in <module>
run_python_file(filename, argv, argvu, file_package)
File "pwb.py", line 80, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "./tests/textlib_tests.py", line 18, in <module>
from tests.aspects import unittest, TestCase, DefaultDrySiteTestCase
File "/home/xzise/Programms/core/tests/aspects.py", line 848, in <module>
import six
ImportError: No module named 'six'
<class 'ImportError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
```
If possible the tests should require `six` and install it before, or stop (with a sensible warning) before, or skip those entries. At least with Python 3.5 we might get a more detailed error message: http://bugs.python.org/issue7559 .
TASK DETAIL
https://phabricator.wikimedia.org/T86640
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise
Cc: Aklapper, XZise, jayvdb, pywikipedia-bugs
jayvdb added a comment.
fwiw, it is quite easy to break the format of this file using control characters (esp. new lines and line feeds), allowing me to create the following entries.
$ cat logs/commands.log
2015-04-05 20:57:51 rg5243 Python 2.7.5 shell "-help"
"015-04-05 21:00:46 rg5243 Python 2.7.5 shell "-help" "
2015-04-05 21:01:28 rg5243 Python 2.7.5 shell "-help" "
"
TASK DETAIL
https://phabricator.wikimedia.org/T69724
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb
Cc: gerritbot, JAnD, jayvdb, Ricordisamoa, droid, 01tonythomas, pywikipedia-bugs
XZise created this task.
XZise added subscribers: XZise, Omegat.
XZise added a project: pywikibot-core.
Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION
When a httplib2.RedirectLimit (maybe also with others) occurred on `pywikibot.comms.http.fetch` it hangs:
```
>>> import pywikibot.comms.http
>>> pywikibot.comms.http.fetch('http://www.tvtropes.org/api.php')
Traceback (most recent call last):
File "/home/xzise/.pyenv/versions/3.4.3/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/home/xzise/Programms/pywikibot/core/pywikibot/comms/threadedhttp.py", line 549, in run
item.data = self.http.request(*item.args, **item.kwargs)
File "/home/xzise/Programms/pywikibot/core/pywikibot/comms/threadedhttp.py", line 260, in request
uri, method, body, headers, response, content, max_redirects)
File "/home/xzise/Programms/pywikibot/core/pywikibot/comms/threadedhttp.py", line 307, in _follow_redirect
max_redirects=max_redirects - 1)
File "/home/xzise/Programms/pywikibot/core/pywikibot/comms/threadedhttp.py", line 260, in request
uri, method, body, headers, response, content, max_redirects)
File "/home/xzise/Programms/pywikibot/core/pywikibot/comms/threadedhttp.py", line 311, in _follow_redirect
response, content)
httplib2.RedirectLimit: Redirected more times than redirection_limit allows.
^CTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/xzise/Programms/pywikibot/core/pywikibot/comms/http.py", line 364, in fetch
error_handling_callback(request)
File "/home/xzise/Programms/pywikibot/core/pywikibot/comms/http.py", line 274, in error_handling_callback
if isinstance(request.data, SSLHandshakeError):
File "/home/xzise/Programms/pywikibot/core/pywikibot/comms/threadedhttp.py", line 392, in data
self._join()
File "/home/xzise/Programms/pywikibot/core/pywikibot/comms/threadedhttp.py", line 386, in _join
self.lock.acquire(True)
File "/home/xzise/Programms/pywikibot/core/pywikibot/comms/threadedhttp.py", line 323, in acquire
return super(S, self).acquire(blocking)
File "/home/xzise/.pyenv/versions/3.4.3/lib/python3.4/threading.py", line 421, in acquire
self._cond.wait(timeout)
File "/home/xzise/.pyenv/versions/3.4.3/lib/python3.4/threading.py", line 290, in wait
waiter.acquire()
KeyboardInterrupt
```
From what I could tell it's not releasing the semaphore correctly (although when looking at the code it should and it does actually call that) and when it then tries to check for errors it tries to acquire it and waits then on it.
try:
# inside of that it crashes
item.data = self.http.request(*item.args, **item.kwargs)
finally:
if item.lock:
# this line is called
item.lock.release()
I tried to determine where it acquires the lock but only find the one place in `fetch` and then one when it tries to get the data in `error_handling_callback`.
(//Note: The line numbers are bit off as I try to debug that one//)
TASK DETAIL
https://phabricator.wikimedia.org/T94993
REPLY HANDLER ACTIONS
Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise
Cc: Omegat, Aklapper, XZise, jayvdb, pywikipedia-bugs