Opened 6 years ago
Last modified 5 years ago
#3744 new defect
Vector query error
Reported by: | balagates | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.8.3 |
Component: | wxGUI | Version: | svn-releasebranch76 |
Keywords: | vector query error JSON | Cc: | |
CPU: | OSX/Intel | Platform: | MacOSX |
Description
For some vector elements I get an error
Failed to query vector map(s) <mrds_id@brett>. Check database settings and topology. Reason: ""}}]}]}]} ... ScriptError: v.what output is not valid JSON format:
Within this vector other points query successfully. My vector mrds_id is Mineral Resource Data System records for mines in Idaho. Within Grass the data is in a sqlite database. Using sqlitebrowser I see no obvious problems on elements that generate query errors.
I suspect the failure is either related to 1) the length of the vector info (number of elements, number of characters, etc) or 2) some special characters within the vector info (maybe parenthesis). The failure happens on maybe 10% of the vector points.
A picture of the error is attached
Attachments (1)
Change History (4)
by , 6 years ago
Attachment: | vector_query_error.png added |
---|
follow-up: 2 comment:1 by , 6 years ago
Replying to balagates:
For some vector elements I get an error
Failed to query vector map(s) <mrds_id@brett>. Check database settings and topology. Reason: ""}}]}]}]} ... ScriptError: v.what output is not valid JSON format:Within this vector other points query successfully. My vector mrds_id is Mineral Resource Data System records for mines in Idaho. Within Grass the data is in a sqlite database. Using sqlitebrowser I see no obvious problems on elements that generate query errors.
I suspect the failure is either related to 1) the length of the vector info (number of elements, number of characters, etc) or 2) some special characters within the vector info (maybe parenthesis). The failure happens on maybe 10% of the vector points.
A picture of the error is attached
The reason for the failure is most probably the entry for "reporter" which has double quotes within double quotes, causing a parse error. A solution could be to escape double quotes within a text field, e.g.
"reporter":"\"Peters, DonaldW.\",\"Loen, Jeffrey S. (Pearson, Robert C.)\""
This would need to be fixed in v.what, somewhere around what.c:L93.
comment:2 by , 6 years ago
comment:3 by , 5 years ago
Milestone: | → 7.8.3 |
---|
screen print of vector query error