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

How can I fix this error? #12

Open
hoavutinh opened this issue Oct 6, 2016 · 1 comment
Open

How can I fix this error? #12

hoavutinh opened this issue Oct 6, 2016 · 1 comment

Comments

@hoavutinh
Copy link

c:\Temp\mmdb-convert-master>mmdb-convert.py GeoLite2-City.mmdb > GeoIPCity.dat
Traceback (most recent call last):
File "C:\Temp\mmdb-convert-master\mmdb-convert.py", line 463, in
metadata, the_tree, _ = parse_mm_file(content)
File "C:\Temp\mmdb-convert-master\mmdb-convert.py", line 327, in parse_mm_file
tree = parse_search_tree(s[:tree_size], mm['record_size'].int_val())
File "C:\Temp\mmdb-convert-master\mmdb-convert.py", line 123, in parse_search_tree
left, right = to_leftright(s[p:p+record_bytes])
File "C:\Temp\mmdb-convert-master\mmdb-convert.py", line 80, in to_int28
a, b = unpack("!LL", s + b'\x00')
NameError: name 'unpack' is not defined

@meteozond
Copy link

from struct import unpack

I guess...

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

No branches or pull requests

2 participants