Closed ewongbb closed 4 years ago
or another option is to:
` try:
self.vars[v] = None
if self.json[v] is not None:
self.vars[v] = self.json[v].strip()
`
This is already fixed in the dev branch. I tested this IP and did get a different parsing error for NIR:
NIR whois field parsing failed for created: time data '2016/05/06' does not match format '%Y/%m/%d %H:%M:%S(JST)'
I'll leave this open to fix that.
Thanks and sorry for not seeing the fix on the dev branch.
I came across this attribute error when doing the following:
x = IPWhois('202.143.89.202').lookup_rdap()
Traceback (most recent call last): File "", line 1, in
File "C:\Program Files\Git\python38\Lib\site-packages\ipwhois\ipwhois.py", line 317, in lookup_rdap
rdap_data = rdap.lookup(
File "C:\Program Files\Git\python38\Lib\site-packages\ipwhois\rdap.py", line 780, in lookup
result_net.parse()
File "C:\Program Files\Git\python38\Lib\site-packages\ipwhois\rdap.py", line 554, in parse
self.vars[v] = self.json[v].strip()
AttributeError: 'NoneType' object has no attribute 'strip'
Apparently the information received as 'type' was null. Not entirely sure how to fix this aside for including AttributeError in the following line in rdap.py