Closed mhabets closed 8 years ago
Yes, QuickOSM is compatible with QGIS 2.X Why did you need to change some code ? What was the error ?
The first message is:
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 219, in startPlugin plugins[packageName] = package.classFactory(iface) File "/home/user/.qgis2/python/plugins/QuickOSM/__init__.py", line 28, in classFactory return QuickOSM(iface) File "/home/user/.qgis2/python/plugins/QuickOSM/quick_osm.py", line 74, in __init__ self.provider = QuickOSMAlgorithmProvider() File "/home/user/.qgis2/python/plugins/QuickOSM/quick_osm_processing/algorithm_provider.py", line 58, in __init__ ListIniFilesGeoAlgorithm(), File "/home/user/.qgis2/python/plugins/QuickOSM/quick_osm_processing/tools/list_ini_files.py", line 47, in __init__ GeoAlgorithm.__init__(self) File "/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line 88, in __init__ self.defineCharacteristics() File "/home/user/.qgis2/python/plugins/QuickOSM/quick_osm_processing/tools/list_ini_files.py", line 56, in defineCharacteristics cat_files = FileQuery.get_ini_files_from_folder(folder, force=False) File "/home/user/.qgis2/python/plugins/QuickOSM/core/file_query.py", line 45, in get_ini_files_from_folder files = [join(folder, f) for f in listdir(folder) if isfile(join( OSError: [Errno 2] No such file or directory: '/home/user/.qgis2/QuickOSM'
Indeed, the plugin is not in /home/user/.qgis2/QuickOSM but in /home/user/.qgis2/python/plugins/QuickOSM. Then after changing utilities_qgis.py:64 as mentioned, I got:
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 219, in startPlugin plugins[packageName] = package.classFactory(iface) File "/home/user/.qgis2/python/plugins/QuickOSM/__init__.py", line 28, in classFactory return QuickOSM(iface) File "/home/user/.qgis2/python/plugins/QuickOSM/quick_osm.py", line 74, in __init__ self.provider = QuickOSMAlgorithmProvider() File "/home/user/.qgis2/python/plugins/QuickOSM/quick_osm_processing/algorithm_provider.py", line 58, in __init__ ListIniFilesGeoAlgorithm(), File "/home/user/.qgis2/python/plugins/QuickOSM/quick_osm_processing/tools/list_ini_files.py", line 47, in __init__ GeoAlgorithm.__init__(self) File "/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line 88, in __init__ self.defineCharacteristics() File "/home/user/.qgis2/python/plugins/QuickOSM/quick_osm_processing/tools/list_ini_files.py", line 56, in defineCharacteristics cat_files = FileQuery.get_ini_files_from_folder(folder, force=False) File "/home/user/.qgis2/python/plugins/QuickOSM/core/file_query.py", line 49, in get_ini_files_from_folder ini.isValid() File "/home/user/.qgis2/python/plugins/QuickOSM/core/file_query.py", line 91, in isValid self.__configParser.read(self.__filePath) File "/usr/lib/python2.7/ConfigParser.py", line 305, in read self._read(fp, filename) File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read raise MissingSectionHeaderError(fpname, lineno, line) MissingSectionHeaderError: File contains no section headers. file: /home/user/.qgis2/python/plugins/QuickOSM/osmconf.ini, line: 7 'closed_ways_are_polygons=aeroway,amenity,boundary,building,craft,geological,historic,landuse,leisure,military,natural,office,place,shop,sport,tourism\n'
So I changed list_ini_files.py:54 as mentioned, and so there is no error message any more when the extension is loaded (version 1.4.1).
It should be fixed now. If you notice this issue again, feel free to open this ticket again.
Well done, it works. Thank you. May be not a bug, but a bit confusing, now, I get two queries folders:
So, I wanted to open the ticket again but I didn't manage to do it.
It's ok.
Indeed, the plugin is not in /home/user/.qgis2/QuickOSM but in /home/user/.qgis2/python/plugins/QuickOSM
Great! thank you again.
I have some issues to install the plugin under QGIS 2.10 Ubuntu 14.04. For example, I have to change some code:
Then, I got this message error when I tried default queries: