question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Roles missing from objects queried using depth parameter

See original GitHub issue

Python version: Python 3.4.3 ipwhois Version: 0.14.0

I am attempting to get role information at depth for RDAP queries, but the roles are only ever filled in for the first level. Examples with the entirely random example IP 12.3.4.5 -

Example 1

import ipwhois
from pprint import pprint
ip = ipwhois.IPWhois("12.3.4.5")
result = ip.lookup_rdap()
pprint(result)

(See ex_1_result.txt, roles are included for ATTW. See also ex_1_debug.txt)

Example 2

import ipwhois
from pprint import pprint
ip = ipwhois.IPWhois("12.3.4.5")
result = ip.lookup_rdap(depth=1)
pprint(result)

(See ex_2_result.txt, roles are included for ATTW again, but missing for all other entities. See also ex_2_debug.txt)

Example 3

wget http://rdap.arin.net/registry/ip/12.3.4.5

(see ex_3_result.txt, roles are included for all entities.)

Based on the debug output, it seems that the role information is available in the initial query but is not used when depth == 0 and ignored or overwritten when depth > 0.

I am not sure if this is by design or if I am otherwise misunderstanding the configuration and expected output here. It is interesting that the results of wget http://rdap.arin.net/registry/ip/12.3.4.5, for example, actually include a number of entities and their associated information that is all removed or ignored when depth == 0. This seems to make sense, but why not include the basic information since it is already there?

I haven’t dug in to the code at all, but I would be happy to do a PR if there is interest in tweaking this functionality.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
secyniccommented, Feb 17, 2017

Awesome, thanks for testing. I’ll get v0.15.1 pushed to PyPi soon.

0reactions
secyniccommented, Feb 17, 2017

Merged in 917b6b5. Waiting for final tests before I push to PyPi. Travis needs to implement load balancing with multiple external IPs. Multiple back to back tests are killing me…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Powershell GCI Recursive Depth Stops Working When Adding ...
The Depth parameter works perfectly and it only searches through the two levels. If I don't include recurse or depth, it works as...
Read more >
Database Engine events and errors - SQL Server
Consult this MSSQL error code list to find explanations for error messages for SQL Server database engine events.
Read more >
SQL Injection Prevention - OWASP Cheat Sheet Series
SQL Injection Prevention Cheat Sheet¶. Introduction¶. This article is focused on providing clear, simple, actionable guidance for preventing SQL Injection ...
Read more >
Use Parameters to Make Views More Interactive - Tableau Help
When you use parameters, you need to tie them to the view in some way: You can use parameters in calculations and calculated...
Read more >
Relationship Loading Techniques
lazy parameter to the relationship() function, as well as by using options with the Query object. The loading of relationships falls into three ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found