File not found error is received when trying to load geocode data via a web file (XML) in QlikView 12.20 and 12.30.
When reloading a geocode script in QlikView 12.20 or 12.30 you may receive:
File not found error
Cannot open file: 'http://www.mapquestapi.com/geocoding/v1/address?key=bjgAYdbu2rIpu5p2wOtNP6taBoKlq9uQ&callback=renderOptions&inFormat=kvp&outFormat=xml&location=1019 MAIN ST,BRANFORD,CT,06405'
The XMLparser used now is different than in the past.
This is an invalid URL for QlikView as it contains spaces. The previous XMLparser would encode the URLs for you and that is no longer the case. The string now needs to be passed in the correct format to the engine for the geocoding to take place. Any spaces will need to be replaced with '%20'.
For example, the spaces within the address will need to be replaced:
- Previously: 1019 MAIN ST,BRANFORD,CT,06405
- Encoded: 1019%20MAIN%20ST,BRANFORD,CT,06405
To resolve this issue, the standardizedAddress string will need to be changed. Where there are spaces put in, '%20' will need to be added instead.
- Previously: standardizedAddress = peek('Address',$(i),'Location') & ' ' & peek('City1',$(i),'Location') & ' ' & peek('Zip',$(i),'Location');
- Encoded: standardizedAddress = peek('Address',$(i),'Location') & '%20' & peek('City1',$(i),'Location') & '%20' & peek('Zip',$(i),'Location');