VcamX added a comment.

I think it's

In https://phabricator.wikimedia.org/T104761#1426373, @jayvdb wrote:

> Another very strange error:
>
>   ERROR: testInternetArchiveNewest (tests.weblib_tests.TestInternetArchive)
>   ----------------------------------------------------------------------
>   Traceback (most recent call last):
>     File "/home/travis/build/wikimedia/pywikibot-core/tests/weblib_tests.py", 
> line 34, in testInternetArchiveNewest
>       parsed = urlparse(archivedversion)
>     File "/opt/python/2.7.9/lib/python2.7/urlparse.py", line 143, in urlparse
>       tuple = urlsplit(url, scheme, allow_fragments)
>     File "/opt/python/2.7.9/lib/python2.7/urlparse.py", line 182, in urlsplit
>       i = url.find(':')
>   AttributeError: 'NoneType' object has no attribute 'find'
>
>
> https://travis-ci.org/wikimedia/pywikibot-core/jobs/69526722#L2916
>  https://travis-ci.org/wikimedia/pywikibot-core/jobs/69914515#L5730


http://archive.org/help/wayback_api.php says about 
`http://archive.org/wayback/available?url=example.com` API (which test suite 
uses):

> This simple API for Wayback is a test to see if a given url is archived and 
> currenlty accessible in the Wayback Machine.




> If the url is not available (not archived or currently not accessible), the 
> response will be:

> 

>   {"archived_snapshots":{}}


The source code shows that when there's no `closest` found, 
`getInternetArchiveURL` will return None. Maybe it happens that the newest 
archive of url for testing (which is `google.com`) is not accessible in the 
Wayback Machine due to some kind of network problems.

For other exceptions, it seems to me that it's related to comms.http module. 
Maybe requests is misused? But I tested them on my laptop and it worked fine. 
@jayvdb mentioned that it occurs regularly, maybe we could track its frequency 
and decide what to do next.


TASK DETAIL
  https://phabricator.wikimedia.org/T104761

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: VcamX
Cc: XZise, Aklapper, jayvdb, pywikibot-bugs-list, Malyacko, P.Copp



_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to