Closed shawnmjones closed 7 years ago
As far as I remember, there is a -e
flag to exclude modules. This exception is happening because you did not provide Bitly key and did not exclude that module. However, I do understand that it needs better documentation in the README
as well as the exception should be caught and gracefully handled with a more friendly message or STDERR
.
/cc @DarkAngelZT
Well, I would agree, but I always get the "please set bitly access token in config" Bitly message, and do not always get this exception.
# sudo docker run --rm -it carbon ./main.py -l search http://www.cs.odu.edu
cdGetBitly.py::GetBitlyJson(), please set bitly access token in config
runtime in seconds: 8
{
"URI": "http://www.cs.odu.edu",
"Estimated Creation Date": "1997-03-24T17:29:34",
"Pubdate tag": "",
"Archives": [
[
"Earliest",
"1997-03-24T17:29:34"
],
[
"By_Archive",
{
"http://web.archive.bibalex.org:80/web/20010414022512/http://www.cs.odu.edu/": "2001-03-23T14:55:45",
"http://arquivo.pt/wayback/20091223043049/http://www.cs.odu.edu/": "2009-12-23T04:30:50",
"http://web.archive.org/web/19971010201632/http://www.cs.odu.edu/": "1997-03-24T17:29:34",
"http://archive.is/19970606105039/http://www.cs.odu.edu/": "1997-06-06T06:50:39",
"http://webcitation.org/query?id=1327284086752784": "2012-01-22T21:01:29"
}
]
],
"Bitly.com": "",
"Backlinks": "",
"Last Modified": "",
"Twitter.com": "2008-12-01T08:53:27",
"Google.com": "2015-06-02T00:00:00",
"Bing.com": ""
}
Instead, as mentioned in the requests.exceptions.InvalidSchema
exception thrown by the Python requests module, the problem appears to be that something along the way discovered a memento at URI hive.org.uk/wayback/archive/20080304103855/http://www.google.com/
and this URI does not have a scheme (i.e., no "http://", "https://", etc.), causing the requests.get on line 85 of modules/cdGetArchives.py
to fail.
Well, which means some sanity check needs to be placed (and fixed) before making the requests call.
With the latest commit (e41e3a81e84bfed093768451f5a68e10368fbae2), when running the Docker instance of CarbonDate in local mode, as per http://ws-dl.blogspot.com/2016/09/2016-09-20-carbon-dating-web-version-30.html, I occasionally get an exception like the following.