NINAnor / GarminCustomMaps

The GarminCustomMap plugin exports the current map canvas to a .kmz-file, which is compatible with Garmin`s Custom Maps format for handheld GPS units. That way individual maps styled in QGIS can be used as background (raster) maps on the compatible Garmin GPS units, like Alpha, Astro, Dakota, Oregon, Colorado, GPSMAP 62 series, GPSMAP 64 series, GPSMAP 78 series, Edge 800, Montana, Rino, eTrex® 20 and 30.
GNU General Public License v2.0
17 stars 6 forks source link

QgsMapSettings.setFlags(): argument 1 has unexpected type 'int' #24

Closed deepnpisgah closed 2 years ago

deepnpisgah commented 2 years ago

Unable to use the plugin. Error argument 1 has unexpected type 'int'

I have tried even with a simple map of a vector gpkg of points and with/without esri basemap.

Thrown as WARNING.

2022-04-08T14:59:02 WARNING Traceback (most recent call last): File "/Users/nthewoods/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/GarminCustomMap/GarminCustomMap.py", line 347, in run mapSettings.setFlags(QgsMapSettings.Antialiasing | QgsMapSettings.UseAdvancedEffects | QgsMapSettings.ForceVectorOutput | QgsMapSettings.DrawLabeling) TypeError: QgsMapSettings.setFlags(): argument 1 has unexpected type 'int'

QGIS version 3.24.1-Tisler QGIS code revision 9d1e5b189a
Qt version 5.15.2
Python version 3.9.5
GDAL/OGR version 3.3.2
PROJ version 8.1.1
EPSG Registry database version v10.028 (2021-07-07)
GEOS version 3.9.1-CAPI-1.14.2
SQLite version 3.35.2
PDAL version 2.3.0
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.6
QScintilla2 version 2.11.5
OS version macOS Mojave (10.14)
       

Active Python plugins numericalDigitize | 0.4.6 QuickOSM | 2.0.1 profiletool | 4.2.2 lines_ranking | 1.0 quick_map_services | 0.19.29 Hy2roresO-master | 0.0.1 LAStools | 1.4 SRTM-Downloader | 3.1.17 GarminCustomMap | 3.3 latlontools | 3.6.3 qfieldsync | v4.0.0 qgis_resource_sharing | 0.16.0 pointsamplingtool | 0.5.3 GroupStats | 2.2.5 qtiles | 1.7.1 processing | 2.12.99 sagaprovider | 2.12.99 grassprovider | 2.12.99 db_manager | 0.1.20 MetaSearch | 0.3.6

QGIS version 3.24.1-Tisler QGIS code revision 9d1e5b189a Qt version 5.15.2 Python version 3.9.5 GDAL/OGR version 3.3.2 PROJ version 8.1.1 EPSG Registry database version v10.028 (2021-07-07) GEOS version 3.9.1-CAPI-1.14.2 SQLite version 3.35.2 PDAL version 2.3.0 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.11.5 OS version macOS Mojave (10.14)

Active Python plugins numericalDigitize 0.4.6 QuickOSM 2.0.1 profiletool 4.2.2 lines_ranking 1.0 quick_map_services 0.19.29 Hy2roresO-master 0.0.1 LAStools 1.4 SRTM-Downloader 3.1.17 GarminCustomMap 3.3 latlontools 3.6.3 qfieldsync v4.0.0 qgis_resource_sharing 0.16.0 pointsamplingtool 0.5.3 GroupStats 2.2.5 qtiles 1.7.1 processing 2.12.99 sagaprovider 2.12.99 grassprovider 2.12.99 db_manager 0.1.20 MetaSearch 0.3.6

mestaley commented 2 years ago

I am experiencing the same error, has anyone found a solution or workaround?

ctorm1 commented 2 years ago

I'm also experiencing the same error. Anybody have any updates on this?

File "/Users/christ/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/GarminCustomMap/GarminCustomMap.py", line 347, in run mapSettings.setFlags(QgsMapSettings.Antialiasing | QgsMapSettings.UseAdvancedEffects | QgsMapSettings.ForceVectorOutput | QgsMapSettings.DrawLabeling) TypeError: QgsMapSettings.setFlags(): argument 1 has unexpected type 'int'

VICTORIGIS commented 2 years ago

I have the same problem. I tried the pull requests for issue 22, but that didnt change anything. But the Plugin seems to be exactly what i´m looking for, so i´m hoping there is a fix. :)

2022-08-23T00:29:16 WARNING Traceback (most recent call last): File "C:\Users/victo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\GarminCustomMap\GarminCustomMap.py", line 347, in run mapSettings.setFlags(QgsMapSettings.Antialiasing | QgsMapSettings.UseAdvancedEffects | QgsMapSettings.ForceVectorOutput | QgsMapSettings.DrawLabeling) TypeError: QgsMapSettings.setFlags(): argument 1 has unexpected type 'int'

esan0 commented 2 years ago

Hey folks, several major changes just pushed to the master branch. Pull the code into your local plugin path directly, and don't forget to add the new optimization.py file!

Please report any issues as new issues.

ninsbl commented 2 years ago

Sorry for radio-silence for so long. And many thanks to @esan0 for the comprehensive re-work. I uploaded the new version to the plugin repo. When it is approved, it should become more easily available. Again thanks to @esan0 , @chrismuller and others for contributing!

VICTORIGIS commented 2 years ago

2022-08-26T09:17:52 WARNING Traceback (most recent call last): File "C:\Users/victo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\GarminCustomMap\GarminCustomMap.py", line 347, in run

TODO: Should be doing this in a separate signal call, connected to the OK button, this way the run method blocks the UI

         TypeError: QgsMapSettings.setFlags(): argument 1 has unexpected type 'int'
esan0 commented 2 years ago

2022-08-26T09:17:52 WARNING Traceback (most recent call last): File "C:\Users/victo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\GarminCustomMap\GarminCustomMap.py", line 347, in run # TODO: Should be doing this in a separate signal call, connected to the OK button, this way the run method blocks the UI TypeError: QgsMapSettings.setFlags(): argument 1 has unexpected type 'int'

Can you provide versions for QGIS and python?

VICTORIGIS commented 2 years ago

Updated Python to 3.10 and it works now. But it only took the vector data, is that normal? Anyway, nice tool! Thanks a lot

image

esan0 commented 2 years ago

Updated Python to 3.10 and it works now. But it only took the vector data, is that normal? Anyway, nice tool! Thanks a lot

image

Hi there, I'm going to close this issue because the int type issue has been fixed.

@VICTORIGIS can you open a new issue describing the problem with only vector layers being added to the KMZ with details such as project content, QGIS and package versions, and the steps you are doing?

Thanks!