Opened 14 years ago
Closed 12 years ago
#1270 closed defect (fixed)
wingrass: Error in Attribute Table Manager
Reported by: | antonioall | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 6.4.3 |
Component: | wxGUI | Version: | svn-develbranch6 |
Keywords: | wingrass, attribute table manager | Cc: | |
CPU: | x86-32 | Platform: | MSWindows Vista |
Description
Hi, If I add columns to the database of a coverage in "Attribute Table Manager" and I modify a value in these columns, Grass shows a message of error (you see attached image) and it doesn't memorize the value.
Thanks
Attachments (4)
Change History (37)
by , 14 years ago
Attachment: | TableError.jpg added |
---|
comment:1 by , 14 years ago
CPU: | x86-64 → x86-32 |
---|
comment:2 by , 14 years ago
Keywords: | wingrass added |
---|
follow-ups: 5 9 18 comment:3 by , 13 years ago
Component: | Database → wxGUI |
---|---|
Keywords: | attribute table manager added |
Milestone: | 6.4.1 → 6.4.2 |
Priority: | normal → critical |
Version: | 6.4.1 RCs → svn-develbranch6 |
comment:4 by , 13 years ago
Summary: | Error in Attribute Table Manager → wingrass: Error in Attribute Table Manager |
---|
maybe this program helps: (lsof for Windows)
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/openfiles.mspx
comment:5 by , 13 years ago
Replying to hamish:
Hi,
I can reproduce this in 6.5svn nightly build on Windows XP.
confirmed
... so it is generally impossible to edit using the attribute table manager in wingrass?! (bumping priority)
but map display -> query raster/vector layer -> click on an activated vector layer feature -> a little windows for updating attributes pops up
there you can edit successfully the attribute for the selected feature.
Helmut
comment:6 by , 13 years ago
suggest to apply this patch to 6.4svn until a solution is found:
Index: gui/wxpython/gui_modules/dbm.py =================================================================== --- gui/wxpython/gui_modules/dbm.py (revision 50681) +++ gui/wxpython/gui_modules/dbm.py (working copy) @@ -546,7 +546,11 @@ self.editable = True else: self.editable = False - + + # FIXME: editing is currently broken on wingrass (bug #1270) + if sys.platform == 'win32': + self.editable = False + self.cmdLog = log # self.parent.goutput wx.Frame.__init__(self, parent, id, style=style)
Hamish
follow-up: 8 comment:7 by , 13 years ago
patch applied in relbr64 in r50701. please test!
sys.platform for Cygwin = cygwin not win32, so it should still work from there.
Hamish
follow-up: 15 comment:8 by , 12 years ago
Replying to hamish:
patch applied in relbr64 in r50701. please test!
tested with
osgeo4w-wingrass6.4.3svn r52715 osgeo4w-wingrass6.5svn r52495
error pop up still there.
but map display -> query raster/vector layer -> click on an activated vector layer feature -> a little windows for updating attributes pops up
there you can edit successfully the attribute for the selected feature without any problem.
Helmut
follow-ups: 10 14 comment:9 by , 12 years ago
Replying to hamish:
Hi,
I can reproduce this in 6.5svn nightly build on Windows XP.
steps as described in the orig report, add a new vector column, edit a row, hit submit.
error is now:
Error: c:\docume~1\hamish\locals~1\temp\tmpuelgf4: Permission denied
Working with a student yesterday, I saw a similar error trying to add a new column.
We were trying to digitize, so I thought it was because the table was open for the digitization, but even when we ended that, no way to add a new column.
Even calling v.db.addcol ended in an error. This all happened in a hurry, so I don't have the exact errors and cannot reproduce right now. Anyone can confirm that this also happens when you try to add a column ? This was with a grass6.4.3svn install (don't have the revision number).
Moritz
by , 12 years ago
Attachment: | edittable1.jpg added |
---|
by , 12 years ago
Attachment: | edittable2.jpg added |
---|
by , 12 years ago
Attachment: | edittable3.jpg added |
---|
comment:10 by , 12 years ago
Replying to mlennert:
Replying to hamish:
Hi,
I can reproduce this in 6.5svn nightly build on Windows XP.
steps as described in the orig report, add a new vector column, edit a row, hit submit.
error is now:
Error: c:\docume~1\hamish\locals~1\temp\tmpuelgf4: Permission deniedWorking with a student yesterday, I saw a similar error trying to add a new column.
still there by editing within the table manager, but not by querying the vector in the map display and changing a table value there.
Helmut
comment:11 by , 12 years ago
Milestone: | 6.4.2 → 6.4.4 |
---|
Hi,
editing the table on WinGrass was greyed-out in the release branch by r50701, but that was lost in a bulk backport. The patch from comment:6 is now reapplied with r55016. It doesn't do anything to fix the problem, but makes it not-release critical since the user won't encounter breakage.
Leaving broken in the release branches in hope of a real fix one day; severity of ticket can be lowered after some testing.
thanks, Hamish
follow-ups: 13 16 comment:12 by , 12 years ago
Milestone: | 6.4.4 → 6.4.3 |
---|---|
Priority: | critical → blocker |
I guess that http://trac.osgeo.org/grass/changeset/55106 will now block any testing.
comment:13 by , 12 years ago
Replying to neteler:
I guess that http://trac.osgeo.org/grass/changeset/55106 will now block any testing.
yes.
Helmut
comment:14 by , 12 years ago
Replying to mlennert: [...]
Even calling v.db.addcol ended in an error.
v.db.addcol works here (latest osgeo4w-nightly build)
Helmut
comment:15 by , 12 years ago
Replying to hellik: [...]
but map display -> query raster/vector layer -> click on an activated vector layer feature -> a little windows for updating attributes pops up
there you can edit successfully the attribute for the selected feature without any problem.
still working this way...
Helmut
follow-ups: 17 19 20 21 comment:16 by , 12 years ago
Replying to neteler:
I guess that http://trac.osgeo.org/grass/changeset/55106 will now block any testing.
not really, just use devbr6 for testing, or open up dbmgr/manager.py in notepad++ or TextPad or whatever favourite text editor under Windows and comment-out the comment-out. The idea of r55106 is to have relbr64 ready for release now, and to continue the debugging in the dev branches. aka this doesn't look like it is being resolved in a hurry, and if we leave it blocking 6.4.3 then the release may take a long time.
is there a wxPy way to grey-out entire tabs? the manage tables and manage layers tabs don't give much feedback that they're disabled beyond "(read-only)" in the window title super-tab. the connection info may still be interesting to see, so fully blocking access to reading what's there wouldn't be the ideal way to do that.. ?
with the r55185-512 6.4.3svn nightly build on Windows7 64bit running the desktop icon wxGUI, I still get an error. Actually it froze with an endless spinning circle hourglass thing when I tried to add a column in the "show attribute data" manage tables tab, with the cursor over any of the open grass windows. I had to kill it by clicking on the "X" in the window, which took out all of grass except a zombie dbf.exe in the task manager + the empty cmd.exe dosbox.
moreover, using v.db.addcol from the main db -> vect db conns menu to add a column had this error:
v.db.addcol --verbose map=copyofbugs2@user1 columns=someint2 integer DBMI-DBF driver error: ERROR: Unable to open database <C:/Program Files (x86)/GRASS GIS 6.4.3svn/msys/Users/Hamish/Documents/GIS DataBase/spearfish60/user1/dbf/> ERROR: Cannot continue (problem adding column).
Somehow ProgramFiles....msys (GISBASE) is sneaking into the GISDBASE. ??
and again there's a dbf.exe zombie in the task manager, so when you try to quit the empty dos box lurking in the background won't exit without a ^C
in it or to kill the dbf.exe in the task manager. No lockup this way though.
running v.db.connect from the same menu has everything looking as it should be:
v.db.connect -p map=copyofbugs2@user1 layer <1> table <copyofbugs2> in database </Users/Hamish/Documents/GIS DataBase\spearfish60\user1\dbf\> through driver <dbf> with key <cat> Vector map <copyofbugs2@user1> is connected by:
well, everything except the order of stderr and stdout, but I can forgive that.
On a hunch I tried dragging a file into the dbf/ folder directly, but it complied and didn't request that I do that as admin.
Hamish
comment:17 by , 12 years ago
Replying to hamish:
Replying to neteler:
I guess that http://trac.osgeo.org/grass/changeset/55106 will now block any testing.
not really, just use devbr6 for testing
... as per previous discussions (see ML archive) I doubt that devbr6 receives reasonable testing.
follow-ups: 22 24 comment:18 by , 12 years ago
Replying to hamish:
suspect the attribute manager is holding the temp file open..
tested with
System Info GRASS version: 6.5.svn GRASS SVN Revision: 55167 GIS Library Revision: 50936 (2012-02-25) GDAL/OGR: 1.9.2 PROJ4: Rel. 4.8.0, 6 March 2012 Python: 2.7.2 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
yes, it seems so.
the temp file is in C:\Users\xxxxxxx\AppData\Local\Temp, the file's content is the sql update command, e.g.
UPDATE myhosp SET testc=2 WHERE cat=1;
any idea how to close the temp file?
Helmut
comment:19 by , 12 years ago
Replying to hamish: [...]
moreover, using v.db.addcol from the main db -> vect db conns menu to add a column had this error:
v.db.addcol --verbose map=copyofbugs2@user1 columns=someint2 integer DBMI-DBF driver error: ERROR: Unable to open database <C:/Program Files (x86)/GRASS GIS 6.4.3svn/msys/Users/Hamish/Documents/GIS DataBase/spearfish60/user1/dbf/> ERROR: Cannot continue (problem adding column).
tested with
GRASS version: 6.4.3svn GRASS SVN Revision: 55185 GIS Library Revision: 50937 (2012-02-25) GDAL/OGR: 1.9.2 PROJ4: Rel. 4.8.0, 6 March 2012 Python: 2.7.2 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
v.db.addcol map=myfires@user1 columns=someint2 integer (Mon Feb 25 21:05:23 2013) Command finished (2 sec)
Helmut
comment:20 by , 12 years ago
Replying to hamish:
moreover, using v.db.addcol from the main db -> vect db conns menu to add a column had this error:
v.db.addcol --verbose map=copyofbugs2@user1 columns=someint2 integer DBMI-DBF driver error: ERROR: Unable to open database <C:/Program Files (x86)/GRASS GIS 6.4.3svn/msys/Users/Hamish/Documents/GIS DataBase/spearfish60/user1/dbf/> ERROR: Cannot continue (problem adding column).
and now tested with the wingrass-standalone installer
GRASS version: 6.4.3svn GRASS SVN Revision: 55185 GIS Library Revision: 50937 (2012-02-25) GDAL/OGR: GDAL 1.9.2, released 2012/10/08 PROJ4: Rel. 4.8.0, 6 March 2012 Python: 2.7.2 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1
v.db.addcol map=myhosp@user1 columns=someint3 integer (Mon Feb 25 21:28:45 2013) Command finished (2 sec)
Helmut
comment:21 by , 12 years ago
Replying to hamish: [...]
with the r55185-512 6.4.3svn nightly build on Windows7 64bit running the desktop icon wxGUI, I still get an error. Actually it froze with an endless spinning circle hourglass thing when I tried to add a column in the "show attribute data" manage tables tab, with the cursor over any of the open grass windows. I had to kill it by clicking on the "X" in the window, which took out all of grass except a zombie dbf.exe in the task manager + the empty cmd.exe dosbox.
tested with
GRASS version: 6.4.3svn GRASS SVN Revision: 55185 GIS Library Revision: 50937 (2012-02-25) GDAL/OGR: GDAL 1.9.2, released 2012/10/08 PROJ4: Rel. 4.8.0, 6 March 2012 Python: 2.7.2 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1
can't reproduce this ...
Helmut
comment:22 by , 12 years ago
comment:23 by , 12 years ago
follow-up: 25 comment:24 by , 12 years ago
Replying to hellik:
Replying to hamish:
suspect the attribute manager is holding the temp file open..
the temp file is in C:\Users\xxxxxxx\AppData\Local\Temp, the file's content is the sql update command, e.g.
UPDATE myhosp SET testc=2 WHERE cat=1;any idea how to close the temp file?
According to the python doc, NamedTemporaryFile is automatically deleted after closing, that's why it's not closed in the code. I suggest using tempfile.mkstemp and use this advice.
follow-up: 26 comment:25 by , 12 years ago
Replying to annakrat:
According to the python doc, NamedTemporaryFile is automatically deleted after closing, that's why it's not closed in the code. I suggest using tempfile.mkstemp and use this advice.
Done in r55306 in release branch. I guess this problem affects all branches. Please test if it helped. I have no experience with temp files on Windows so maybe someone has better solution.
Anna
follow-up: 27 comment:26 by , 12 years ago
Replying to annakrat:
Replying to annakrat:
According to the python doc, NamedTemporaryFile is automatically deleted after closing, that's why it's not closed in the code. I suggest using tempfile.mkstemp and use this advice.
Done in r55306 in release branch. I guess this problem affects all branches. Please test if it helped. I have no experience with temp files on Windows so maybe someone has better solution.
thanks trying to find a solution. is editing within atm still greyed out?
if yes, maybe this should also be changed that testing is available.
Helmut
follow-up: 28 comment:27 by , 12 years ago
comment:28 by , 12 years ago
Replying to annakrat:
Replying to hellik:
if yes, maybe this should also be changed that testing is available.
thanks, done in r55310. We must keep it in mind and reapply it if the fix fails.
tested with
System Info GRASS version: 6.4.3svn GRASS SVN Revision: 55310 GIS Library Revision: 50937 (2012-02-25) GDAL/OGR: 1.9.2 PROJ4: Rel. 4.8.0, 6 March 2012 Python: 2.7.2 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
in the atm:
(1) adding coloumns (integer, double, varchar, datum) => works
(2) editing a row in the table => works
closing ticket?
thanks
Helmut
follow-up: 30 comment:29 by , 12 years ago
There are some other places in digitizer (in vdigit/mapwindow.py) where the same problem should occur. For example adding new feature to a vector map (with attributes) should fail because of the same reason but it seems to work on Windows (please test this case too to be sure).
Anna
follow-ups: 31 32 comment:30 by , 12 years ago
Replying to annakrat:
There are some other places in digitizer (in vdigit/mapwindow.py) where the same problem should occur. For example adding new feature to a vector map (with attributes) should fail because of the same reason but it seems to work on Windows (please test this case too to be sure).
digitizing tested with
System Info GRASS version: 6.4.3svn GRASS SVN Revision: 55310 GIS Library Revision: 50937 (2012-02-25) GDAL/OGR: 1.9.2 PROJ4: Rel. 4.8.0, 6 March 2012 Python: 2.7.2 wxPython: 2.8.12.1 Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
starting to digitize a new vector, defining new columns (integer, double, varchar, datum) works.
digitizing a new point, line or area, the window to enter attributes pops up, but no fields to enter attributes are displayed, on the top of the popup window there is the message "no attributes found".
furthermore, after finishing digitizing point, line and area, only the boundary of the area is displayed ( an extra build topology doesn't help), although there seems point, line and area inside the new vector.
v.info map=testv@user1 +----------------------------------------------------------------------------+ | Layer: testv@user1 | | Mapset: user1 | | Location: nc_spm_08 | | Database: C:\grassdata | | Title: | | Map scale: 1:1 | | Map format: native | | Name of creator: myricaria | | Organization: | | Source date: Mon Mar 11 12:16:59 2013 | |----------------------------------------------------------------------------| | Type of Map: vector (level: 2) | | | | Number of points: 2 Number of areas: 1 | | Number of lines: 2 Number of islands: 1 | | Number of boundaries: 1 Number of faces: 0 | | Number of centroids: 1 Number of kernels: 0 | | | | Map is 3D: No | | Number of dblinks: 1 | | | | Projection: Lambert Conformal Conic | | N: 227647.21627409 S: 215332.44111349 | | E: 644033.19057816 W: 631689.50749465 | | | | Digitization threshold: 0 | | Comments: | | | +----------------------------------------------------------------------------+
maybe that's worth for another ticket?
Helmut
comment:31 by , 12 years ago
Replying to hellik: [...]
digitizing tested with
System Info GRASS version: 6.4.3svn
also the same in osgeo4w-wingrass6dev
starting to digitize a new vector, defining new columns (integer, double, varchar, datum) works.
digitizing a new point, line or area, the window to enter attributes pops up, but no fields to enter attributes are displayed, on the top of the popup window there is the message "no attributes found".
furthermore, after finishing digitizing point, line and area, only the boundary of the area is displayed ( an extra build topology doesn't help), although there seems point, line and area inside the new vector.
after a manually v.category input=testv@user1 option=add to the new digitized vector, point, line and area are displaye correctly.
Helmut
follow-up: 33 comment:32 by , 12 years ago
Replying to hellik:
maybe that's worth for another ticket?
yes, see http://trac.osgeo.org/grass/ticket/1904
closing ticket?
comment:33 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hi,
I can reproduce this in 6.5svn nightly build on Windows XP.
steps as described in the orig report, add a new vector column, edit a row, hit submit.
error is now:
exiting & restarting grass doesn't help, nor does rebooting. (there's not zombie dbf.exe afterwards either)
same error if I try to add a new row or delete and old one.
... so it is generally impossible to edit using the attribute table manager in wingrass?! (bumping priority)
suspect the attribute manager is holding the temp file open..
Hamish