You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
results in an error. I don't know if the above line is wrong or whether there's a bug in how the attribute lookup chain is supposed to work. Changing the above line to this works though:
h=WARCHeader({"WARC-Type": "response"}, defaults=True)
r = WARCRecord(h)
r
Traceback (most recent call last):
File "", line 1, in
File "init.py", line 186, in repr
return "<WARCRecord: type=%r record_id=%s>" % (self['type'], self['record_id'])
File "init.py", line 172, in getitem
return self.header[name]
File "init.py", line 40, in getitem
return self._d[name.lower()]
KeyError: 'type'
The text was updated successfully, but these errors were encountered:
The line in repr:
return "<WARCRecord: type=%r record_id=%s>" % (self['type'], self['record_id'])
results in an error. I don't know if the above line is wrong or whether there's a bug in how the attribute lookup chain is supposed to work. Changing the above line to this works though:
return "<WARCRecord: type=%r record_id=%s>" % (self.header.type, self.header.record_id)
Traceback below.
The text was updated successfully, but these errors were encountered: