DataFormat.Error in Power Query

JanakiRam

New Member
Joined
Feb 22, 2016
Messages
6
Hi All,
I am getting below error in Power Query while pulling data from web.

DataFormat.Error: Specified value has invalid CRLF characters.
Parameter name: value
Details:
OAuth oauth_consumer_key="@@@",oauth_nonce="@@@",
oauth_signature="@@@", oauth_signature_method="HMAC-SHA1?
Note : if i removed quotes for the above parameters from the blow code i am getting Invalid Identifier error : (

let

Source = Web.Page(Web.Contents("https://api.twitter.com/1.1/search/tweets.json?q=spotfire"),[Headers=[#"Authorization"="OAuth oauth_consumer_key=""@@@"",
oauth_signature=""@@@"", oauth_signature_method=""HMAC-SHA1?", oauth_timestamp="@@@",
oauth_token="@@@", oauth_version="""1.0?"""]])
in
Source
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Are you passing parameters to where the placeholders @@@ stand now?

Then clean them before passing on, using Text.Clean:
= Table.TransformColumns(#"Previous Step",{{"Parameter", Text.Clean}})

This will remove unprintable characters like carriage returns and line feeds.
 
Last edited:
Upvote 0
Are you passing parameters to where the placeholders @@@ stand now?

Then clean them before passing on, using Text.Clean:
= Table.TransformColumns(#"Previous Step",{{"Parameter", Text.Clean}})

This will remove unprintable characters like carriage returns and line feeds.

Hi,

I have removed my tokens and key at placeholders for the confidentiality and put @@@.
But still getting same error
 
Upvote 0
Hm - just had a look at your code and it seems that the closing parenthesis after spotfire shouldn't be there:

spotfire"),[Headers=[#"

try spotfire",[Headers=[#" instead and move the paranthesis to the end instead.
 
Upvote 0
Oh My Bad... Please see the updated code, But still giving getting same error "DataFormat.Error: Specified value has invalid CRLF characters."

= Web.Page(Web.Contents("https://api.twitter.com/1.1/search/tweets.json?q=spotfire",[Headers=[#"Authorization"="OAuth oauth_consumer_key=""@@@"",oauth_nonce=""389952772"",
oauth_signature=""@@@"", oauth_signature_method=""HMAC-SHA1?", oauth_timestamp="1455867899",
oauth_token="@@@", oauth_version="""1.0?"""]]))

please help on this, as not able to pull web data from the link past one week. I am not able to attach screen shot on this thread.

Thanks in advance.

 
Upvote 0
a quote-sign too much in here:
oauth_version="""1.0?"""]]))

should be oauth_version=""1.0?"""]]))

But apart from that I'm running out of ideas.
I'd send a frown to the Microsoft-team then - they are really helpful.
 
Upvote 0
Do you copy/paste the @@@ parameter values or type them in manually?
If copy/paste: Then could it be that there are linefeeds in there?
 
Upvote 0
Below is the updated code with no errors but returning only document with null table as elements.
let

source = Web.Page(Web.Contents("https://api.twitter.com/1.1/search/tweets.json?q=spotfire",[Headers=[#"Authorization"="OAuth",
[FONT=inherit]
#"oauth_consumer_key"="@@@",#"oauth_nonce"="1440311449",
#"oauth_signature"="@@@", #"oauth_signature_method"="HMAC-SHA1?",
#"oauth_timestamp"="1456200733", #"oauth_token"="@@@", #"oauth_version"="1.0"]]))

in
source[/FONT]

Note: I am getting invalid error if i put double quote for oauth_timestamp and oauth_token and oauth_version is using two quotes getting error but if i use " ? "i am getting below error too.
DataSource.Error: The remote server return an HTTP status code '400' when trying to access 'https://api.twitter.com/1.1/search/tweets.json?q=spotfire'.
Details:
DataSourceKind=Web
DataSourcePath=https://api.twitter.com/1.1/search/tweets.json
Url=https://api.twitter.com/1.1/search/tweets.json?q=spotfire

 
Upvote 0

Forum statistics

Threads
1,224,153
Messages
6,176,729
Members
452,740
Latest member
MrCY

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top