Modify

Opened 8 weeks ago

Closed 8 weeks ago

Last modified 8 weeks ago

#23925 closed defect (fixed)

Cannot fetch a map of my small city: "bad request". In error popup - please provide a link where to download the data manually

Reported by: anonymous Owned by: team
Priority: normal Milestone: 24.09
Component: Core Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Install on Gentoo Linux
  2. Try to fetch a small region (works on very small)

Error text:

The OSM server 'api.openstreetmap.org' reported a bad request. The area you tried to download is too big or your request was too large. Either request a smaller area or use an export file provided by the OSM community.

Good to have a link here for that export file from OSM community - I do not know where to download it.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2024-07-02 17:10:50 +0200 (Tue, 02 Jul 2024)
Revision:19128
Build-Date:2024-07-03 01:31:15
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (19128 en) Linux Gentoo Linux
Memory Usage: 628 MB / 3960 MB (440 MB allocated, but free)
Java version: 17.0.12+7, Eclipse Adoptium, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1366x768x[Multi depth]@60Hz (scaling 1.00×1.00)
Maximum Screen Size: 1366×768
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: C.UTF8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djava.library.path=/lib64, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED]

Last errors/warnings:
- 00124.848 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>
- 00124.859 E: Bad Request - <html>The OSM server 'api.openstreetmap.org' reported a bad request.<br><br>The area you tried to download is too big or your request was too large.<br>Either request a smaller area or use an export file provided by the OSM community.</html>
- 00155.473 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>
- 00155.477 E: Bad Request - <html>The OSM server 'api.openstreetmap.org' reported a bad request.<br><br>The area you tried to download is too big or your request was too large.<br>Either request a smaller area or use an export file provided by the OSM community.</html>
- 00202.132 E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>
- 00202.138 E: Bad Request - <html>The OSM server 'api.openstreetmap.org' reported a bad request.<br><br>The area you tried to download is too big or your request was too large.<br>Either request a smaller area or use an export file provided by the OSM community.</html>

Attachments (1)

23925.patch (2.8 KB ) - added by taylor.smock 8 weeks ago.

Download all attachments as: .zip

Change History (13)

comment:1 by taylor.smock, 8 weeks ago

Resolution: wontfix
Status: newclosed

There are several different locations where you can download larger extracts from OSM.

You can use Overpass, you can use GeoFabrik, you can use the actual planet.pbf, etc.

I would recommend the first option since the other two options will use significantly more memory.

Last edited 8 weeks ago by taylor.smock (previous) (diff)

comment:2 by taylor.smock, 8 weeks ago

Also that message comes from the server.

comment:3 by vitaly-zdanevich, 8 weeks ago

You can use Overpass, you can use ​GeoFabrik, you can use the actual planet.pbf, etc.

Please mention them in that error popup, with links.

And if limit 50000 is known before - can we show that info without the network call?

in reply to:  3 ; comment:4 by taylor.smock, 8 weeks ago

Replying to vitaly-zdanevich:

Please mention them in that error popup, with links.

The error message is direct from the server. We can parse it, but that is fragile. And so I'm disinclined to implement something that will eventually break.

And if limit 50000 is known before - can we show that info without the network call?

Only if we know that there are 50k nodes at the location in question. Which we do not know ahead of time.

in reply to:  4 comment:5 by stoecker, 8 weeks ago

Replying to taylor.smock:

Replying to vitaly-zdanevich:

Please mention them in that error popup, with links.

The error message is direct from the server. We can parse it, but that is fragile. And so I'm disinclined to implement something that will eventually break.

We have already a "try to make readable" in trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java. We can expand this. I think here explainBadRequest() is relevant. I think we didn't change this for a long time, so may be some extensions could be helpful.

The rule for this stuff is simple: When you know the message and it comes often then explain, otherwise pass through ;-) The class probably also contains some "can't happen anymore".

comment:6 by taylor.smock, 8 weeks ago

Resolution: wontfix
Status: closedreopened

It looks like we are actually writing the message ourselves. So I was wrong to close this as WONTFIX anyway.

in reply to:  6 comment:7 by stoecker, 8 weeks ago

Replying to taylor.smock:

It looks like we are actually writing the message ourselves.

Only "append". The original message should have been in the dialog as well.

by taylor.smock, 8 weeks ago

Attachment: 23925.patch added

comment:8 by taylor.smock, 8 weeks ago

Do you know if we have a good reason to not have clickable hyperlinks in HelpAwareOptionPane?

comment:9 by stoecker, 8 weeks ago

Hmm,

  • wasn't there when code was written,
  • wasn't known to the developers,
  • nobody thought it helps?

No, I have no idea why. 😽

P.S. I'd add a 'recommended' to the smaller area and somehhing like 'if you know what you do' for the other options. Could prevent trouble...

Version 0, edited 8 weeks ago by stoecker (next)

in reply to:  9 comment:10 by taylor.smock, 8 weeks ago

Replying to stoecker:

P.S. I'd add a 'recommended' to the smaller area and something like 'if you know what you do' for the other options. Could prevent trouble...

Probably a good idea. :) I was thinking about adding recommended to overpass, but recommending a smaller area is the better option.

comment:11 by taylor.smock, 8 weeks ago

Resolution: fixed
Status: reopenedclosed

In 19225/josm:

Fix #23925: Indicate/link to alternative download methods when the user attempts to download too much data

comment:12 by taylor.smock, 8 weeks ago

Milestone: 24.09

Modify Ticket

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