Skip to content

Error when going to another thread #2

@CDSkyward

Description

@CDSkyward

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions