Forum Discussion
KGuthrie-NF
2 years agoRegular Visitor
Error message with no details
I am trying to get data from a web call. The API generates a data set that I need to convert to a CSV in a step. However, when I try to work with the data every field gets an "An unexpected error occurred" message on every field.
I have searched and could not find anything on why this might be happening.
- Anonymous2 years ago
Hi KGuthrie-NF - it is difficult to trouble-shoot across this forum. Here is what I would try to understand the issue.
- Try to download the file outside of Power Query, connect to this to make sure it is not corrupt.
- if it works, I would try adding a Binary.Buffer - PowerQuery M | Microsoft Learn step between the Web.Contents and Csv.Documents. Note that Power Query will something Nested these functions: Csv.Document( Web.Contents() ). However, you can separate these steps in the advanced editor. The reason for using Binary.Buffer is to make Power Query download the whole file before starting the transformation.
- If the error still continues, I would try to read the binary file as text using Text.FromBinary - PowerQuery M | Microsoft Learn. Hopefully, the file opens in comma delimited format. You find that the text encoding make the file readable. TextEncoding.Type - PowerQuery M | Microsoft Learn
2 Replies
- AnonymousNot applicable
Hi KGuthrie-NF - it is difficult to trouble-shoot across this forum. Here is what I would try to understand the issue.
- Try to download the file outside of Power Query, connect to this to make sure it is not corrupt.
- if it works, I would try adding a Binary.Buffer - PowerQuery M | Microsoft Learn step between the Web.Contents and Csv.Documents. Note that Power Query will something Nested these functions: Csv.Document( Web.Contents() ). However, you can separate these steps in the advanced editor. The reason for using Binary.Buffer is to make Power Query download the whole file before starting the transformation.
- If the error still continues, I would try to read the binary file as text using Text.FromBinary - PowerQuery M | Microsoft Learn. Hopefully, the file opens in comma delimited format. You find that the text encoding make the file readable. TextEncoding.Type - PowerQuery M | Microsoft Learn
- KGuthrie-NFRegular Visitor
It worked perfectly. The new Source statement is:
Source = Csv.Document(Binary.Buffer(Web.Contents("https://.......7")),[Delimiter=","])