Map note error 500

Similar to the thread Broken links to map notes earlier this year, I try to view two possibly duplicate notes, specifically 3124016 and 3126097, as listed in User:Kmpoppe/Potential Note Duplicates - OpenStreetMap Wiki, but both redirect to HTTP 500 error. It seems the related Github issue is still open.

The API shows this and this. Looks like in both cases, not just no comment, but not even user ID. Tried to navigate there using the coords mentioned in the API, but of course they don’t show up on map. And the close_url mentioned in the API doesn’t work (I guess it needs to be called by a function and authenticated and not just by visiting it in browser).

How can I close those notes?

4 Answers

4

@jimkats did notice I had swapped lat/lon and after correcting that I could download the two notes in Pátra/Patras using Josm and close them.

Which honestly gives the opportunity to raise the issue of this co-ordinate swap in notes. I don't know if it's mentioned anywhere, but that's for another topic anyway. Thanks again for the assistance.

You were I think on the correct way by trying using the API but like you already noted, to make changes you need to be authenticated.

I would try to download the notes in Josm and if that works use Josm to close them. I could not test it as I do not know the coordinates, I do not see the coordinates in the API links you shared.

The coordinates are mentioned in <note lon="21.7403516" lat="38.2547447">

I did try to download the notes using Josm using the coordinate given and I see Josm executing:

2023-10-08 09:21:17.006 INFO: GET https://api.openstreetmap.org/api/0.6/notes?limit=100&closed=30&bbox=38.2490754,21.7359987,38.2604168,21.744711

That bbox includes <note lon=lon="21.7403516" lat="38.2547447"and is in the middle of the Red Sea.

But no notes found, so the API does not return these notes when querying on lat/lon.

So I started playing with Osmapi:

-> note = api.NoteGet(3124016)
-> pprint(note)
{'comments': [],
 'date_closed': None,
 'date_created': datetime.datetime(2022, 4, 8, 9, 27, 57),
 'id': '3124016',
 'lat': 38.2547447,
 'lon': 21.7403516,
 'status': 'open'}

But just when wanted to close the note I noticed the not seems to be deleted, the code that was working earlier gives ElementNotFoundApiError(404, 'Not Found', b''). Same for the other note.

Of course there’s no user id if a note has no visible comments. The id can only be on a comment.

And it’s not the only bug related to such notes. The note layer on the osm website is also broken. Not only it won’t show you notes without comments, it will also drop all earlier notes in the same view.

Example:

There’s a zero-comment note on the airfield which you won’t be able to see on osm.org. But can you see this note while the airfield is visible by opening the first link?

Indeed I have seen the issue of hiding notes within view, unless you either pan the view a lot further or zoom in/out till it shows up. It can be annoying at times, trying to figure if more notes exist in the area, but for sure not as severe as not showing empty notes. And I didn't know the user ID gets appended due to the comment and not just by creating the note. Thank you for the info.