Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
matdardenne
New Member

Script works on Desktop, but not on Service. Says "unsupported conversion"

Hello,

 

I'm trying to use R to create a table with a single element where it displays the reverse geocoded address of a lat-lon position using Nominatim.

 

It works fine on the desktop version:  

 

print_funcionando.PNGBut it displays this error when I publish it to the web:

print_erro.PNG

This is the code I am using, nothing fancy:

library(gridExtra)
library(httr)

lat <- dataset$latitude
lon <- dataset$longitude

x <- c("http://nominatim.openstreetmap.org/reverse?format=json&lat=", lat, "&lon=", lon)
request_url <- paste(x, collapse="")

r <- GET(request_url)
r <- content(r)

address <- r$address

t <- data.frame(
    Rua=c(address$road),
    Cidade=c(address$city),
    UF=c(address$state)
)

grid.table(t)

 

What could be causing this issue "Error in iconv(x, "latin1", "ASCII") : unsupported conversion from 'latin1' to 'ASCII' in codepage 1252"? I researched it around the web, but found nothing that could give me a hint on what to do.

 

Please know that I am very new both to Power BI and R, so if anyone can lend me a hand, try to be very specific.

1 ACCEPTED SOLUTION

@matdardenne There are only certain packages that are supported in the Service, see here for which one's. I'm not really familiar with this area, but it looks like the httr library isn't supported.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

3 REPLIES 3

@matdardenne There are only certain packages that are supported in the Service, see here for which one's. I'm not really familiar with this area, but it looks like the httr library isn't supported.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

@Seth_C_Bauer

Trully the httr package is not mentioned in the supported packages list. It is hopeless then, I guess.

 

Thanks anyway for your quick reply.

At the moment HTTR is listed as a supported library, however I still get the same error as the OP.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors