Skip to content

KeyError: 'warc-target-uri' #36

@catharsis71

Description

@catharsis71

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 "<stdin>", line 2, in <module>
  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'
>>>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions