Modify

Opened 3 years ago

Closed 3 years ago

#21021 closed defect (fixed)

Using date:* in the Download Query Wizard prevents JOSM from loading data

Reported by: dafadllyn Owned by: Don-vip
Priority: normal Milestone: 21.06
Component: Core Version:
Keywords: template_report overpass download Cc: simon04

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. Open JOSM
  2. Click on Download data
  3. Click on Download from Overpass API
  4. Click on Query Wizard
  5. Enter
    amenity=post_box and newer:"2021-05-30T20:00:00Z" and type:node in "Kanton Bern"
    
  6. Click on Build query and execute

What is the expected result?

It should load the data.

What happens instead?

JOSM reports: "An unexpected exception occurred."

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

It seems the problem is that the wizard creates a wrong query:

[out:xml][timeout:90];
{{geocodeArea:Kanton Bern}}->.searchArea;
(
  node["amenity"="post_box"](newer:"{{date:2021-05-30T20:00:00Z}}")(area.searchArea);
);
(._;>;);
out meta;

It should be

(newer:"2021-05-30T20:00:00Z")

instead of

(newer:"{{date:2021-05-30T20:00:00Z}}").

After correcting the query, JOSM loaded the data.

Revision:17919
Build-Date:2021-06-02 20:30:01

Identification: JOSM/1.5 (17919 en) Mac OS X 10.13.6
OS Build number: Mac OS X 10.13.6 (17G14042)
Memory Usage: 155 MB / 1024 MB (41 MB allocated, but free)
Java version: 16.0.1+9, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 69677504 1280×800 (scaling 1.00×1.00)
Maximum Screen Size: 1280×800
Best cursor sizes: 16×16→16×16, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_CH
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=17919, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=/Applications/JOSM.app/Contents/MacOS/JOSM]

Plugins:
+ reverter (35732)
+ undelete (35640)
+ utilsplugin2 (35691)

Last errors/warnings:
- 00251.666 E: Handled by bug report queue: java.time.format.DateTimeParseException: Text cannot be parsed to a Duration
- 00294.798 E: Handled by bug report queue: java.time.format.DateTimeParseException: Text cannot be parsed to a Duration
- 00309.829 E: Handled by bug report queue: java.time.format.DateTimeParseException: Text cannot be parsed to a Duration



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (25) of main
java.time.format.DateTimeParseException: Text cannot be parsed to a Duration
	at java.base/java.time.Duration.parse(Unknown Source)
	at org.openstreetmap.josm.io.OverpassDownloadReader.date(OverpassDownloadReader.java:275)
	at org.openstreetmap.josm.io.OverpassDownloadReader.expandExtendedQueries(OverpassDownloadReader.java:208)
	at org.openstreetmap.josm.io.OverpassDownloadReader.getRequestForBbox(OverpassDownloadReader.java:190)
	at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:194)
	at org.openstreetmap.josm.io.OverpassDownloadReader.parseOsm(OverpassDownloadReader.java:389)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:462)
	at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:470)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:94)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:142)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

Attachments (0)

Change History (8)

in reply to:  description comment:1 by dafadllyn, 3 years ago

Replying to dafadllyn@…:

  1. Enter
    amenity=post_box and and newer:"2021-05-30T20:00:00Z" and type:node in "Kanton Bern"
    

I'm sorry, i've made a mistake (double "and"). It should read:

amenity=post_box and newer:"2021-05-30T20:00:00Z" and type:node in "Kanton Bern"

comment:2 by Don-vip, 3 years ago

Description: modified (diff)

comment:3 by Don-vip, 3 years ago

Keywords: overpass download added

comment:4 by Don-vip, 3 years ago

Cc: simon04 added

It seems r16264 was incorrect.

comment:5 by Don-vip, 3 years ago

Milestone: 21.06
Owner: changed from team to Don-vip
Status: newassigned

comment:6 by Don-vip, 3 years ago

Resolution: fixed
Status: assignedclosed

In 17982/josm:

fix #21021 - see #18164 - OverpassTurboQueryWizard: fix "newer" statements

comment:7 by Don-vip, 3 years ago

Resolution: fixed
Status: closedreopened

comment:8 by Don-vip, 3 years ago

Resolution: fixed
Status: reopenedclosed

In 17988/josm:

fix #21021 - proper fix of "newer" keyword, handling both formats (date and duration)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
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.