Opened 5 years ago

Last modified 4 years ago

#3744 new defect

Vector query error

Reported by: balagates Owned by: grass-dev@…
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)

vector_query_error.png (161.1 KB ) - added by balagates 5 years ago.
screen print of vector query error

Download all attachments as: .zip

Change History (4)

by balagates, 5 years ago

Attachment: vector_query_error.png added

screen print of vector query error

in reply to:  description ; comment:1 by mmetz, 5 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.

in reply to:  1 comment:2 by mmetz, 5 years ago

Replying to mmetz:

This would need to be fixed in v.what, somewhere around what.c:L93.

Should be fixed in trunk r74048

comment:3 by neteler, 4 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.