Power BI Parameter Error – Invalid URI: The hostname could not be parsed


Today I encountered an issue in Power BI where a user was building a dashboard from a template I had created. The template has a single parameter, which is the full path to the exported .csv file. Several people have successfully used the template, but one user kept hitting the following error.

DataFormat.Error: Invalid URI: The hostname could not be parsed.

errormessage-invaliduri-thehostnamecouldnotbeparsed2

Solution:

The user had supplied the full path to the .csv file with quotes surrounding the full path (Example: "C:\Folder\File.csv"). By removing the quotes, the template worked as expected.

This was the first time I've encountered this error message, which is quite easy to stumble upon if you are using the Shift + Right-Click "Copy as path" functionality in Windows Explorer, as this includes the quotes that led to this issue.

Hope this helps,
Sam Lester (MSFT)

 

Comments (3)

  1. Yoshihiro Kawabata says:

    Thank you for your solution.
    I hope Text.Trim function by remove quotes surrounding path in the template query.

  2. Shweta says:

    I am also geeting same issue while connecting to a oData feed from Power BI desktop application. Can you help

    1. Hi Shweta, since it is coming from an OData source, you might want to ask in the Power BI forums under the “Integration with Files and Services” category. The link is http://community.powerbi.com/t5/Integrations-with-Files-and/bd-p/power-bi-services. Is the error message related to a parameter value? In my case, the parameter value supplied with quotes was the cause of the problem.

      Good luck,
      Sam

Skip to main content