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

After adding a custom image and extracting its features, clicking on the image resulted in the following error message #39

Open
BigBigOranges opened this issue Mar 12, 2024 · 2 comments

Comments

@BigBigOranges
Copy link

2024-03-12T17:29:22 WARNING Traceback (most recent call last):
File "C:\Users/njchy1303/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Geo-SAM\geo_sam_tool.py", line 387, in execute_segmentation
self.ensure_polygon_sam_exist()
File "C:\Users/njchy1303/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Geo-SAM\geo_sam_tool.py", line 369, in ensure_polygon_sam_exist
self.load_shp_file()
File "C:\Users/njchy1303/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Geo-SAM\geo_sam_tool.py", line 458, in load_shp_file
self.polygon = SAM_PolygonFeature(
File "C:\Users/njchy1303/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Geo-SAM\tools\canvasTool.py", line 398, in init
self.init_layer()
File "C:\Users/njchy1303/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Geo-SAM\tools\canvasTool.py", line 402, in init_layer
self._load_shapefile(self.shapefile)
File "C:\Users/njchy1303/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Geo-SAM\tools\canvasTool.py", line 430, in _load_shapefile
fields.extend(
TypeError: QgsFields.extend(): argument 1 has unexpected type 'list'

@Fanchengyan
Copy link
Collaborator

Hi @BigBigOranges,

Please first ensure that the output shapefile of Geo-SAM is correct. It is recommended to directly click on ... after Output Layer or File option to select a path and create a new one. If the issue persists, please download the main library code and replace the original code to test it.

@BigBigOranges
Copy link
Author

Replacing the main program code has solved the problem. Thank you for your answer.

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