2

I'm working on Windows 10 with MapInfo Pro 16.0, QGIS 2.16.3.

I tried to use the usefull following plugin called "MapInfo to QGIS style generator":

https://github.com/NathanW2/MapInfo-to-QGIS-style-generator/wiki/Using-MapInfo-to-QGIS-style-generator.

But when i launch this following command via osgeo4w shell :

python mapinfoToQgis.py F:\temp\commerces.TAB F:\temp\out.qml -c ID_SYMBOLOGIE --UseMapInfo

An error message appears. Please reading the following error message:

F:\temp\plugin\plugin> python mapinfoToQgis.py F:\temp\commerces.TAB F:\temp\out.qml -c ID_SYMBOLOGIE --UseMapInfo
Opening MapInfo...
Traceback (most recent call last):
  File "mapinfoToQgis.py", line 308, in <module>
    gen.createQMLFromMapInfoTable(args[0],args[1],columnName)
  File "mapinfoToQgis.py", line 242, in createQMLFromMapInfoTable
    mapinfo = Dispatch("MapInfo.Application")
  File "C:\PROGRA~1\QGIS2~1.16\apps\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
    dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "C:\PROGRA~1\QGIS2~1.16\apps\Python27\lib\site-packages\win32com\client\dynamic.py", line 114, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\PROGRA~1\QGIS2~1.16\apps\Python27\lib\site-packages\win32com\client\dynamic.py", line 91, in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147221005, 'Chaine de classe incorrecte', None, None)

Could you throw light for me regarding the meaning of the error message and could youhow to help me in order to find a solution?


Sorry but I rejoiced too quickly yesterday. The Peter 's procedure allows indeed to no longer have an error message during the execution of the command. However, the plugin does not seem to work. No task is done. I let the process run all the night. And the status stays always on "Opening Mapinfo ... Exporting style table" enter image description here ... But nothing else. No qml file has been generated. It's strange because i managed to use this plugin in march 2015 last year (with a previous mapinfo version) ... According to you, the reason of the problems could be from updates realised beteween previous version and last new mapinfo v.16?

  • 1
    I'm voting to close this question as off-topic because we are not a formal GIS Software Support Site and are likely to close questions and recommend you seek official routes for support. – Matthias Kuhn Nov 17 '16 at 7:26
4

This isn't an answer to you but more a solution to the developer of the "MapInfo to QGIS style generator" tool.

When getting the MapInfo Pro 32-bit application thru OLE, you should specify "MapInfo.Application" as seen in the error code:

mapinfo = Dispatch("MapInfo.Application")

But when lauching MapInfo Pro 64-bit, which MapInfo Pro 16.0 is, you need to specify "MapInfo.Application.x64":

mapinfo = Dispatch("MapInfo.Application.x64")
  • Did you open an issue report on the plugin issue tracker? or even better propose a patch (try current code if it excepts, try the new code) – Matthias Kuhn Nov 16 '16 at 22:39
  • 1
    Nice. Thanks Peter. Been a while since I have used MapInfo ;) – Nathan W Nov 16 '16 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.