Forum Discussion

FormigoJoao's avatar
FormigoJoao
Frequent Visitor
5 years ago
Solved

The downloaded data is HTML, which isn't the expected type. The URL may be wrong ...

Hello ! 

 

I have been trying to get data about instagram tags using this: https://www.instagram.com/explore/tags/lisbon/?__a=1.
The link returns this JSON.

So far it has been working perfectly fine, it was refreshed a couple of times as well in the Desktop but then I went to the Service and I tried to refresh and it returned the following error: "The downloaded data is HTML, which isn't the expected type. The URL may be wrong or you might not have provided the right credentials to the server."

 

Afterwards I went back to the Desktop to try and understand what was happening and search on the internet but all of a sudden in the desktop it started returning the same error.

It has totally stoped working in the desktop. I've been trying to remake it all from new as well but hasn't worked out.

 

I have been searching but not much luck.

 

Anyone can help, has any tips?

Thank you in advance,

João

  • Hello ! 

    I tried a new query and also opened a new powerbi desktop file and it would always return the same. It started returning the error on the desktop after I published to the service and tried to refresh from there. (no ideia why)

    However, I found something. By setting the code with a cookie on the header it would return the json again but then on the service it still wouldn't refresh, but then I installed the gateway and from there I was able to refresh everything just fine.



    Honesty not quite sure what was happening or the problem was but I am still looking at it trying to understand, but so far found a workaround that way.

     

    Thank you,

     

    João

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi,

     

    I faced the same issue and fixed it by following the steps below.

     

    1) Open Power Query Editor.

    2) Go to the first step (Source) in the table. Press the settings icon near the word 'Source'.

    3) If the link is incorrect, replace the old link with the new/correct one and enter credentials, if necessary.

    4) If the link is correct, replace the credentials.

     

    You don't have to recreate your table. Just need to change the link and/or credentials and everything will go back to place.

     

    Thank you!

5 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    I tried that url with Json.Document(Web.Contents(...  and it worked as expected.  Not sure what you are seeing.  If you create a new query, do you still see the error?

     

     

    Pat

     

     

    • FormigoJoao's avatar
      FormigoJoao
      Frequent Visitor

      Hello ! 

      I tried a new query and also opened a new powerbi desktop file and it would always return the same. It started returning the error on the desktop after I published to the service and tried to refresh from there. (no ideia why)

      However, I found something. By setting the code with a cookie on the header it would return the json again but then on the service it still wouldn't refresh, but then I installed the gateway and from there I was able to refresh everything just fine.



      Honesty not quite sure what was happening or the problem was but I am still looking at it trying to understand, but so far found a workaround that way.

       

      Thank you,

       

      João

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi,

         

        I faced the same issue and fixed it by following the steps below.

         

        1) Open Power Query Editor.

        2) Go to the first step (Source) in the table. Press the settings icon near the word 'Source'.

        3) If the link is incorrect, replace the old link with the new/correct one and enter credentials, if necessary.

        4) If the link is correct, replace the credentials.

         

        You don't have to recreate your table. Just need to change the link and/or credentials and everything will go back to place.

         

        Thank you!

  • Anonymous's avatar
    Anonymous
    Not applicable

    same issue i found , connecting to my excel table in sharepoint. while switching same file to online sharepoint. can anyone assist.

    how can i switch report local to online connection?