Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'_build_query_href' method AttributeError #20

Closed
whatabeautifulmemory opened this issue Dec 29, 2022 · 2 comments · Fixed by #21
Closed

'_build_query_href' method AttributeError #20

whatabeautifulmemory opened this issue Dec 29, 2022 · 2 comments · Fixed by #21

Comments

@whatabeautifulmemory
Copy link

import whodap
whodap.lookup_ipv4('128.201.214.5')

in rare cases, an 'IPv4Address' object is given instead of the 'str' to '_build_query_href' method.

line 444, in _build_query_href
href = posixpath.join(rdap_href, 'ip', target.lstrip('/'))
AttributeError: 'IPv4Address' object has no attribute 'lstrip'

@whatabeautifulmemory whatabeautifulmemory changed the title AttributeError on '_build_query_href' method '_build_query_href' method AttributeError Dec 29, 2022
pogzyb added a commit that referenced this issue Dec 29, 2022
Fixes #20. This change makes sure that ipaddress objects are converted to
strings before doing string concatentation.
@pogzyb
Copy link
Owner

pogzyb commented Dec 29, 2022

Thank you for finding this bug! I think I solved the issue in #21 . I'm doing some more testing before merging. I will put out a release for version 0.1.7 with this fix today or tomorrow. Thanks again.

@whatabeautifulmemory
Copy link
Author

thank you! it works perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants