An error has occurred while executing Python code:
AttributeError: 'array.array' object has no attribute 'fromstring'
Traceback (most recent call last):
File "C:\Users/proje/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 612, in run
w = Queen.from_shapefile(layerName.split("|")[0])
File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\weights\contiguity.py", line 236, in from_shapefile
w = cls(FileIO(filepath), ids=ids, *kwargs)
File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\weights\contiguity.py", line 182, in init
neighbors, ids = _build(polygons, ids=ids,
File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\weights\contiguity.py", line 385, in _build
neighbor_data = ContiguityWeightsLists(polygons, wttype=wttype).w
File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\weights_contW_lists.py", line 53, in init
self.collection = list(collection)
File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\fileio.py", line 254, in next
r = self.read()
File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\fileio.py", line 315, in read
row = self._read()
File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\iohandlers\pyShpIO.py", line 140, in _read
rec = self.dataObj.get_shape(self.pos)
File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\util\shapefile.py", line 362, in get_shape
return self.shape.unpack(bufferIO(self.fileObj.read(byts)))
File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\util\shapefile.py", line 636, in unpack
_unpackDict2(record, contentStruct, dat)
File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\util\shapefile.py", line 155, in _unpackDict2
result.fromstring(fileObj.read(result.itemsize n))
AttributeError: 'array.array' object has no attribute 'fromstring'
Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]
QGIS version: 3.16.11-Hannover Hannover, 26cc1c76
Please help me to fix this problem.
An error has occurred while executing Python code:
AttributeError: 'array.array' object has no attribute 'fromstring' Traceback (most recent call last): File "C:\Users/proje/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 612, in run w = Queen.from_shapefile(layerName.split("|")[0]) File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\weights\contiguity.py", line 236, in from_shapefile w = cls(FileIO(filepath), ids=ids, *kwargs) File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\weights\contiguity.py", line 182, in init neighbors, ids = _build(polygons, ids=ids, File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\weights\contiguity.py", line 385, in _build neighbor_data = ContiguityWeightsLists(polygons, wttype=wttype).w File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\weights_contW_lists.py", line 53, in init self.collection = list(collection) File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\fileio.py", line 254, in next r = self.read() File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\fileio.py", line 315, in read row = self._read() File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\iohandlers\pyShpIO.py", line 140, in _read rec = self.dataObj.get_shape(self.pos) File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\util\shapefile.py", line 362, in get_shape return self.shape.unpack(bufferIO(self.fileObj.read(byts))) File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\util\shapefile.py", line 636, in unpack _unpackDict2(record, contentStruct, dat) File "C:\PROGRA~1\QGIS31~1.11\apps\Python39\lib\site-packages\pysal\lib\io\util\shapefile.py", line 155, in _unpackDict2 result.fromstring(fileObj.read(result.itemsize n)) AttributeError: 'array.array' object has no attribute 'fromstring'
Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS version: 3.16.11-Hannover Hannover, 26cc1c76