Opened 13 years ago
Closed 13 years ago
#1534 closed defect (fixed)
vector_db_select fails with kwargs
Reported by: | artegion | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 6.4.2 |
Component: | Python | Version: | unspecified |
Keywords: | vector_db_select | Cc: | |
CPU: | Unspecified | Platform: | All |
Description
in lib/python/vector.py, at line 205, fs option makes trouble if kwargs is not None
00202 ret = read_command('v.db.select',
00203 map = map,
00204 layer = layer,
00205 fs = '|', kwargs)
i.e. grass.vector_select('lakes', where='cat in (1,2,3,4,5)') because start_command transforms | character into shell pipe
""where=cat in (1,3,4,5)"" non è riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
ERRORE: vector_select() failed
possible solutions: 1) fs=| is default option in v.db.select so
00202 ret = read_command('v.db.select', 00203 map = map, 00204 layer = layer, 00205 kwargs) # fs = '|', removed
will work
2) change | with another character ....
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Keywords: | vector_db_select added |
---|---|
Priority: | critical → minor |
Resolution: | → fixed |
Status: | new → closed |
committed in all branches. a general solution dealing with the root cause would be interesting to learn about, but is not needed in this particular case.
AFAICT the function is not used by any of the core grass scripts AFAICT, so lowering priority.
Hamish
patch as suggested in summary:
Hamish