Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3103 closed defect (fixed)

vector import wizzard and v.in.ogr --ui fails to import a vector

Reported by: hellik Owned by: grass-dev@…
Priority: critical Milestone: 7.4.0
Component: Vector Version: svn-trunk
Keywords: Cc:
CPU: x86-64 Platform: MSWindows 8

Description

trying to import a vector (shape file) with the import common vector format wizzards I get:

Traceback (most recent call last):
  File "C:\OSGEO4~1\apps\Python27\lib\site-packages\wx-2.8
-msw-unicode\wx\lib\filebrowsebutton.py", line 140, in
OnChanged

self.changeCallback(evt)
  File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\gu
i_core\gselect.py", line 2055, in OnUpdate

self._reloadLayers()
  File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\gu
i_core\gselect.py", line 2155, in _reloadLayers

self.reloadDataRequired.emit(listData=listData, data=data)
  File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\etc\python\gras
s\pydispatch\signal.py", line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
  File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\etc\python\gras
s\pydispatch\dispatcher.py", line 349, in send

**named
  File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\etc\python\gras
s\pydispatch\robustapply.py", line 60, in robustApply

return receiver(*arguments, **named)
  File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\mo
dules\import_export.py", line 541, in reload

self.list.LoadData(listData)
  File "C:\OSGEO4~1\apps\grass\grass-7.3.svn\gui\wxpython\gu
i_core\widgets.py", line 1024, in LoadData

index = self.InsertStringItem(sys.maxsize, str(item[0]))
  File "C:\OSGEO4~1\apps\Python27\lib\site-packages\wx-2.8
-msw-unicode\wx\lib\mixins\listctrl.py", line 753, in
__InsertStringItem_

index = self.InsertImageStringItem(index, label, 0)
  File "C:\OSGEO4~1\apps\Python27\lib\site-packages\wx-2.8
-msw-unicode\wx\_controls.py", line 4769, in
InsertImageStringItem

return _controls_.ListCtrl_InsertImageStringItem(*args,
**kwargs)
OverflowError
:
Python int too large to convert to C long

then v.in.ogr --ui, selecting the shapefile by browsing to the file, no layer is detected.

tested

System Info                                                                     
GRASS Version: 7.3.svn                                                          
GRASS SVN revision: r68983                                                      
Build date: 2016-07-16                                                          
Build platform: x86_64-w64-mingw32                                              
GDAL: 2.1.0                                                                     
PROJ.4: 4.9.2                                                                   
GEOS: 3.5.0                                                                     
SQLite: 3.7.17                                                                  
Python: 2.7.5                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-8-6.2.9200 (OSGeo4W)      

Change History (5)

comment:1 by hellik, 8 years ago

Priority: normalcritical

in reply to:  description ; comment:2 by hellik, 8 years ago

Replying to hellik:

trying to import a vector (shape file) with the import common vector format wizzards I get:

[...]
 Python int too large to convert to C long

just tested with the NC sample data set,

first

v.out.ogr input=firestations@PERMANENT output=D:\temp\test\myfirest.shp format=ESRI_Shapefile

then trying to reimport it, no chance.

in reply to:  2 comment:3 by hellik, 8 years ago

Replying to hellik:

Replying to hellik:

trying to import a vector (shape file) with the import common vector format wizzards I get:

[...]
 Python int too large to convert to C long

just tested with the NC sample data set,

first

v.out.ogr input=firestations@PERMANENT output=D:\temp\test\myfirest.shp format=ESRI_Shapefile

then trying to reimport it, no chance.

at least it works by the command line:

v.in.ogr input=D:\temp\test\myfirest.shp output=myfstations                     
Check if OGR layer <myfirest> contains polygons...
Column name <cat> renamed to <cat_>
Importing 71 features (OGR layer <myfirest>)...
-----------------------------------------------------
Erstelle Topologie für die Vektorkarte <myfstations@user1>...
Registriere Primitive...
71 primitives registered
71 Vertices registriert
Erzeuge Flächen...
0 areas built
0 isles built
Füge Inseln hinzu...
Füge Zentroide hinzu...
Anzahl der Knoten: 0
Anzahl der Primitive: 71
Anzahl der Punkte: 71
Anzahl der Linien: 0
Anzahl der Grenzen: 0
Anzahl der Zentroide: 0
Anzahl der Flächen: 0
Anzahl der Inseln: 0
(Sun Jul 17 11:51:03 2016) Befehl ausgeführt (0 Sek) 

but not by GUI

comment:4 by annakrat, 8 years ago

Resolution: fixed
Status: newclosed

In 68999:

wxGUI: fix #3103 - sys.maxsize doesn't work in 64bit windows

comment:5 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

Note: See TracTickets for help on using tickets.