Opened 10 months ago

Last modified 10 months ago

#3744 new defect

Vector query error

Reported by: balagates Owned by: grass-dev@…
Priority: normal Milestone:
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 10 months ago.
screen print of vector query error

Download all attachments as: .zip

Change History (3)

Changed 10 months ago by balagates

Attachment: vector_query_error.png added

screen print of vector query error

comment:1 in reply to:  description ; Changed 10 months ago by mmetz

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 in reply to:  1 Changed 10 months ago by mmetz

Replying to mmetz:

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

Should be fixed in trunk r74048

Note: See TracTickets for help on using tickets.