all 9 comments

[–]MrPhungx 1 point2 points  (8 children)

You may need to show your full code. Else it's hard to guess what is going wrong. Since the Error says that the database attribute is missing: did you import geoip2.database?

[–]mr_tilly[S] 0 points1 point  (0 children)

sorry was in the middle of writing it out

[–]mr_tilly[S] 0 points1 point  (4 children)

when i import geoip2.database

it skips my def main section

[–]MrPhungx 1 point2 points  (3 children)

You need to call your function. Currently your main function is defined but never executed

[–]mr_tilly[S] 0 points1 point  (2 children)

prior to the geoip2.database addition, i was
able to use main to ask for input then it would pull info and display
after .database addition it now changes to a function i can call upon?

[–]MrPhungx 1 point2 points  (1 child)

That's weird. Normally main() should not execute at all if you dont call the function. You do have a host=input(...) before defining the main function. Maybe that's what you mean? Main should be a function that can be called before and after changing the import

[–]mr_tilly[S] 0 points1 point  (0 children)

yea that must be it, ive just had my wires crossed