internetarchive / internetarchive/warc

KeyError: 'warc-target-uri'

Open
#36 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
250
Forks
114
PR merge metrics
No merged PRs in 30d

Description

I have been unable to accomplish anything with this, I always get errors like the following:

```
$ python2
Python 2.7.18 (default, Mar 8 2021, 13:02:45)
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import warc
>>> f = warc.open("195.242.99.71-8181-2016-03-23-3324e7c6-00001.warc")
>>> for record in f:
... print record['WARC-Target-URI'], record['Content-Length']
...
Traceback (most recent call last):
File "", line 2, in
File "/home/username/.local/lib/python2.7/site-packages/warc/warc.py", line 199, in __getitem__
return self.header[name]
File "/home/username/.local/lib/python2.7/site-packages/warc/utils.py", line 34, in __getitem__
return self._d[name.lower()]
KeyError: 'warc-target-uri'
>>>
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.