Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12083 closed defect (fixed)

[Patch] Error message: Error in filter "unexpected token. Expected <right parent>, found <key>"

Reported by: maarten Owned by: simon04
Priority: normal Milestone: 16.02
Component: Core Version: latest
Keywords: filter search expression Cc:

Description (last modified by Don-vip)

When downloading relation 346385 in JOSM, at the end of the loading I get a popup error mesage Error in filter "unexpected token. Expected <right parent>, found <key>" (see attachment).
In the console there are no error messages, just all the GET lines from the objects in the relation.

Error in filter

Attachments (3)

ErrorInFilter.png (6.6 KB ) - added by maarten 8 years ago.
Error in filter
12083-show-filter-with-error.patch (4.2 KB ) - added by simon04 8 years ago.
12083-better-search-compile-error.patch (2.4 KB ) - added by simon04 8 years ago.

Download all attachments as: .zip

Change History (18)

by maarten, 8 years ago

Attachment: ErrorInFilter.png added

Error in filter

comment:1 by Don-vip, 8 years ago

Owner: changed from team to maarten
Status: newneedinfo

Please attach your status report as required in newticket

comment:2 by Don-vip, 8 years ago

Description: modified (diff)

comment:3 by anonymous, 8 years ago

Owner: changed from maarten to anonymous
Status: needinfonew

There is no bug message coming up, so I didn't know there had to be a status report.
From the shift-F1:

What steps will reproduce the problem?

  1. download relation 346385

What is the expected result?

Relation 346385 is downloaded without error message

What happens instead?

An error message appears (see screenshot)

Please provide any additional information below. Attach a screenshot if possible.

Revision: 8969
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: Don-vip
Last Changed Date: 2015-10-29 22:15:23 +0100 (Thu, 29 Oct 2015)
Build-Date: 2015-10-30 02:32:24
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8969

Identification: JOSM/1.5 (8969 en) Windows 7 64-Bit
Memory Usage: 93 MB / 1160 MB (13 MB allocated, but free)
Java version: 1.8.0_40, Oracle Corporation, Java HotSpot(TM) Client VM
Dataset consistency test: No problems found

Plugins:
- HouseNumberTaggingTool (31603)
- apache-commons (31718)
- download_along (31603)
- ext_tools (31603)
- geotools (31603)
- jts (31603)
- log4j (31603)
- measurement (31694)
- photo_geotagging (31694)
- public_transport (31646)
- reverter (31694)
- routing (31694)
- terracer (31694)
- undelete (31603)
- utilsplugin2 (31694)
- wms-turbo-challenge2 (31603)

Last errors/warnings:
- E: Failed to locate image 'maxspeed_icon.svg'
- W: Mappaint style "standard" (Maxspeed) icon "maxspeed_icon.svg" not found.
- W: Cannot start IPv4 remotecontrol server on port 8111: Address already in use: JVM_Bind
- W: Cannot start IPv6 remotecontrol server on port 8111: Address already in use: JVM_Bind
- W: Cannot lock cache directory. Will not use disk cache

comment:4 by Klumbumbus, 8 years ago

Owner: changed from anonymous to team

comment:5 by simon04, 8 years ago

Owner: changed from team to maarten
Status: newneedinfo

This comes from the search compiler. Which filters, presets etc. are active? I cannot reproduce w/ a clean config.

comment:6 by maarten, 8 years ago

I don't know what kind of information you need or where I can get it.

comment:8 by maarten, 8 years ago

Tagging presets: Internal Preset resource://data/defaultpresets.xml
I don't know where to get Dialog/Filter (it is not in Help, Preferences is also not in Help, it is in Edit)
I found a filters.entries in the status report, does that help?

filters.entries=[{version=1, text=(building=yes tags:1) OR (building=yes source=* tags:2) OR (building=yes "3dshapes:ggmodelk" source tags:3) OR (building=yes type tags:2) OR (building=yes source type tags:3) OR (type:way landuse=construction AND construction=building), mode=add, enable=true, hiding=false, inverted=false}, {version=1, text=("addr:interpolation" OR "addr:street" OR "addr:housenumber") -bag:conversie -(amenity OR leisure OR shop OR office OR tourism OR name) -source:BAG, mode=add, enable=true, hiding=false, inverted=false}, {version=1, text=bag=conversie, mode=add, enable=true, hiding=false, inverted=false}, {version=1, text=nodes:20- building, mode=add, enable=true, hiding=false, inverted=false}]

comment:9 by Don-vip, 8 years ago

Description: modified (diff)
Owner: changed from maarten to team
Status: needinfonew

comment:10 by simon04, 8 years ago

Keywords: filter search expression added
Milestone: 16.02

Your first filter entry is invalid:

(building=yes tags:1) OR (building=yes source=* tags:2) OR (building=yes "3dshapes:ggmodelk" source tags:3) OR (building=yes type tags:2) OR (building=yes source type tags:3) OR (type:way landuse=construction AND construction=building

The error is in (building=yes source type tags:3) since type is a keyword expecting either type:node, type:way, type:relation.

To reproduce, one can also use (foo type bar) as a very compact example.

The error message is very cryptic.

by simon04, 8 years ago

comment:11 by simon04, 8 years ago

Owner: changed from team to simon04
Summary: Error message: Error in filter "unexpected token. Expected <right parent>, found <key>"[Patch] Error message: Error in filter "unexpected token. Expected <right parent>, found <key>"

comment:12 by simon04, 8 years ago

In 9348/josm:

see #12083 - When activating an erroneous filter, name the filter with the error

comment:13 by simon04, 8 years ago

In 9349/josm:

see #12083 - Search: improve error message when keyword without a required parameter is used

Example: foo type bar

comment:14 by simon04, 8 years ago

Resolution: fixed
Status: newclosed

comment:15 by simon04, 8 years ago

In 9373/josm:

see #12083 - Fix unit test

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.