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

Error when going to another thread #2

Open
SCZSkyward opened this issue Jul 27, 2022 · 2 comments
Open

Error when going to another thread #2

SCZSkyward opened this issue Jul 27, 2022 · 2 comments

Comments

@SCZSkyward
Copy link
Contributor

Exception in thread 7:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\User\Downloads\servers-scanner\main.py", line 44, in thread
isBlacklisted, blacklistedPool = intIsBlacklisted(curr)
File "C:\Users\User\Downloads\servers-scanner\main.py", line 32, in intIsBlacklisted
if IPDatabase.get_country_short(intToIP(num)) in blacklistedCountries:
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\IP2Location.py", line 234, in get_country_short
rec = self.get_all(ip)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\IP2Location.py", line 330, in get_all
return self._get_record(addr)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\IP2Location.py", line 668, in _get_record
ipfrom, ipto = self.readRow32(baseaddr + mid * self._dbcolumn * 4 )
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\IP2Location.py", line 503, in readRow32
ip_from = struct.unpack('<L', raw_data[0:4])[0]
struct.error: unpack requires a buffer of 4 bytes
Exception in thread 3:
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\User\Downloads\servers-scanner\main.py", line 44, in thread
isBlacklisted, blacklistedPool = intIsBlacklisted(curr)
File "C:\Users\User\Downloads\servers-scanner\main.py", line 32, in intIsBlacklisted
if IPDatabase.get_country_short(intToIP(num)) in blacklistedCountries:
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\IP2Location.py", line 234, in get_country_short
rec = self.get_all(ip)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\IP2Location.py", line 330, in get_all
return self._get_record(addr)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\IP2Location.py", line 668, in _get_record
ipfrom, ipto = self.readRow32(baseaddr + mid * self._dbcolumn * 4 )
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\IP2Location.py", line 503, in readRow32
ip_from = struct.unpack('<L', raw_data[0:4])[0]
struct.error: unpack requires a buffer of 4 bytes

@suiramdev
Copy link
Owner

Oops, I didn't see your issue, I've been busy. I'll take a look.

@suiramdev suiramdev pinned this issue Aug 19, 2022
@SCZSkyward
Copy link
Contributor Author

Okay, No problem!

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