Forum Discussion
HTTP 403 error
- 5 years ago
Hi Anonymous
It might be that the user agent in PBI is being blocked, or the URL is somehow being malformed inside PBI?
You could try using Fiddler to see what traffic is going between PBI and the website so you can see what PBI is sending.
https://www.telerik.com/fiddler
Phil
- Anonymous5 years ago
Hi Phil,
Thanks for the suggestion. I ran the Python script in Pycharm, that worked.
I have never used Fiddler, so wouldn't know how to link to Power BI??
I followed Chris Webb's Blog (https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/), to minimise the number of times entering the API token.
I have the Web.Contents() icon in Power BI Fields tag, but don't see the icon in the Data Sources Settings as shown in the Blog??
When I run the Parse JSOn option, I get DataFormat.Error:
DataFormat.Error: We found extra characters at the end of JSON input.
Details:
Value=
Position=0Still can't run the REST URL??
- 5 years ago
Hi Anonymous ,
Have you checked the json format is valid before using it in power bi? Invalid json format could casue the data format error.
About HTTP 403 error, you can refer these simliar issues and articles:
- 403 Error when trying to access REST API
- Power BI REST API gives 403 error (User does not have access to group)
- FIX: Power BI error Access to the resource is forbidden
In addition, since there is only data field in the table, could you please consider sharing some screenshots in power query about this issue?
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
It might be that the user agent in PBI is being blocked, or the URL is somehow being malformed inside PBI?
You could try using Fiddler to see what traffic is going between PBI and the website so you can see what PBI is sending.
https://www.telerik.com/fiddler
Phil
- Anonymous5 years agoNot applicable
Hi Phil,
Thanks for the suggestion. I ran the Python script in Pycharm, that worked.
I have never used Fiddler, so wouldn't know how to link to Power BI??
I followed Chris Webb's Blog (https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/), to minimise the number of times entering the API token.
I have the Web.Contents() icon in Power BI Fields tag, but don't see the icon in the Data Sources Settings as shown in the Blog??
When I run the Parse JSOn option, I get DataFormat.Error:
DataFormat.Error: We found extra characters at the end of JSON input.
Details:
Value=
Position=0Still can't run the REST URL??
- PhilipTreacy5 years ago
Super User
Hi Anonymous
Fiddler is a proxy, it intercepts all HTTP(S) traffic between your PC and the internet. You don't need to link/configure PBI to use it. Once Fiddler is up and running it will see all web traffic for all programs so you just need to look for the PBI traffic to see what is being sent and received.
That said, I am now confused by a few things in your reply.
I was actually going to suggest you just use a regular Get Data -> Web query as all you Python script seems to be doing is fetching a web page. Do you have to use Python for this?
In your reply you mention Web.Contents(), so have you already switched to using this in PBI?
I have the Web.Contents() icon in Power BI Fields tag, but don't see the icon in the Data Sources Settings as shown in the Blog??
I'm not sure what exactly you are referring to here. Chris Webb's blog post shows the Data Source Settings that are displayed the first time you connect to web content. When you first run a web query this should pop up automatically. So are you now using a web query? If so can you please share it.
Regarding the JSON error, is the query actually receiving JSON?
Please share your query and the URL you are trying to reach.
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
- Anonymous5 years agoNot applicable
My updates didn't appear to get uploaded??
My python script imports a JSON file, that contains data that I want to use.
"fields": [ { "name": "objectid", "type": "esriFieldTypeOID", "alias": "OBJECTID", "domain": null, "editable": false, "nullable": false, "defaultValue": null, "modelName": "objectid" }, { "name": "cfa_id", "type": "esriFieldTypeString", "alias": "CFA_ID", "domain": null, "editable": true, "nullable": true, "length": 8000, "defaultValue": null, "modelName": "CFA_ID" }, { "name": "farm_holding_name", "type": "esriFieldTypeString", "alias": "Farm Holding Name", "domain": null, "editable": true, "nullable": true, "length": 8000, "defaultValue": null, "modelName": "Farm_Holding_Name" },The Table appears in the Query and Dashboard.
Value = #"Converted to Table"{47}[Value] Kept Range = List.Range(Value,0,8)The Fields column on the Dashboard only shows the data icon, I cannot see any fields??