Swooz
Swooz

Reputation: 5

AttributeError: 'NoneType' object has no attribute 'strftime'AttributeError: 'NoneType' object has no attribute 'strftime'

I get an error for "AttributeError: 'NoneType' object has no attribute 'strftime'AttributeError: 'NoneType' object has no attribute 'strftime'". see full trace below:

ipython-input-96-a5697ab98b57> in <module>
----> 1 client.whois(domains)

/opt/conda/envs/rapids/lib/python3.8/site-packages/clx/osi/whois.py in whois(self, domains, arr2str)
     60                 resp_keys = resp.keys()
     61                 resp = self.__flatten_str_array(resp, resp_keys)
---> 62                 resp = self.__flatten_datetime_array(resp, resp_keys)
     63             result.append(resp)
     64         return result

/opt/conda/envs/rapids/lib/python3.8/site-packages/clx/osi/whois.py in __flatten_datetime_array(self, resp, resp_keys)
     79                     resp[key] = self.sep.join(values)
     80                 else:
---> 81                     resp[key] = resp[key].strftime(self.datetime_format)
     82         return resp

AttributeError: 'NoneType' object has no attribute 'strftime'

Upvotes: 0

Views: 480

Answers (2)

Frederic Bazin
Frederic Bazin

Reputation: 1529

something like that would be more compatible with pandas domains.apply(lambda x: client.whois(x))

Upvotes: 0

Swooz
Swooz

Reputation: 5

The domains dataframe output:

domains.head()

j1417YEBMzlLJcALS71Z           firefox.com
tl417YEBMzlLJcALhb3-    cloudflare-dns.com
0l417YEBMzlLJcALpb1E      launchdarkly.com
3F417YEBMzlLJcALtL3q             pndsn.com
Name: dns.question.registered_domain, dtype: string

Upvotes: 0

Related Questions