XML parser error in geocoding when hashtag in string
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 43
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
When geocoding queries have a hashtag/pound symbol, it errors out. Reproducible example with an address where nothing changes except the hashtag:
> geocode_OSM("Mamata College of Nursing, Tenali, 7-5-26, lecturers colony, ganganammapeta, tenali, Guntur, Andhra Pradesh")
No results found for "Mamata College of Nursing, Tenali, 7-5-26, lecturers colony, ganganammapeta, tenali, Guntur, Andhra Pradesh".
NULL
> geocode_OSM("Mamata College of Nursing, Tenali, #7-5-26, lecturers colony, ganganammapeta, tenali, Guntur, Andhra Pradesh")
Opening and ending tag mismatch: meta line 6 and head
Entity 'times' not defined
Entity 'copy' not defined
error parsing attribute name
attributes construct error
Couldn't find end of Start Tag input line 160
error parsing attribute name
attributes construct error
Couldn't find end of Start Tag input line 192
Opening and ending tag mismatch: input line 270 and div
Opening and ending tag mismatch: div line 269 and form
Opening and ending tag mismatch: form line 268 and div
Opening and ending tag mismatch: div line 267 and script
Opening and ending tag mismatch: td line 418 and tr
Opening and ending tag mismatch: tr line 416 and table
Opening and ending tag mismatch: table line 370 and div
EntityRef: expecting ';'
Opening and ending tag mismatch: div line 356 and script
expected '>'
Entity 'nbsp' not defined
expected '>'
Opening and ending tag mismatch: script line 318 and body
Opening and ending tag mismatch: script line 253 and html
Premature end of data in tag body line 18
Premature end of data in tag meta line 4
Premature end of data in tag head line 3
Premature end of data in tag html line 2
Error: 1: Opening and ending tag mismatch: meta line 6 and head
2: Entity 'times' not defined
3: Entity 'copy' not defined
4: error parsing attribute name
5: attributes construct error
6: Couldn't find end of Start Tag input line 160
7: error parsing attribute name
8: attributes construct error
9: Couldn't find end of Start Tag input line 192
10: Opening and ending tag mismatch: input line 270 and div
11: Opening and ending tag mismatch: div line 269 and form
12: Opening and ending tag mismatch: form line 268 and div
13: Opening and ending tag mismatch: div line 267 and script
14: Opening and ending tag mismatch: td line 418 and tr
15: Opening and ending tag mismatch: tr line 416 and table
16: Opening and ending tag mismatch: table line 370 and div
17: EntityRef: expecting ';'
18: Opening and ending tag mismatch: div line 356 and script
19: expected '>'
20: Entity 'nbsp' not defined
21: expected '>'
22: Opening and ending tag mismatch: script line 318 and body
23: Opening and ending t
This seems to be an XML issue, but I don't understand why it's showing up in geocode_OSM. My session info:
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the geocode_OSM entry point and reproduce the two address queries shown in the issue, comparing the normal no-results response with the hashtag case. Trace how the query is sent and parsed; done means hashtag-containing queries no longer produce the reported XML parser errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100