COVAIL / cognizer

R package to call IBM Watson services.
http://columbuscollaboratory.com
Other
119 stars 41 forks source link

"No version provided " error in text_personality cognizeR #9

Closed selphin closed 7 years ago

selphin commented 7 years ago

I am getting "No version provided". What will be the possible reasons ?

text <- paste(replicate(1000, rmsfact::rmsfact()), collapse = ' ') result <- text_personality(text, PERSONALITY_USERNAME_PASSWORD)

str(result)

List of 1 $ :List of 3 ..$ code : int 400 ..$ sub_code: chr "S00016" ..$ error : chr "No version provided"

petegordon commented 7 years ago

Sorry for the delay; hopefully you've resolved the issue.

You are using your own BlueMix Username and Password for...PERSONALITY_USERNAME_PASSWORD? I just tried the code and got a valid result using my own BlueMix API Key (it is a UUID).

This is my code...

library(cognizer)
text <- paste(replicate(1000, rmsfact::rmsfact()), collapse = ' ')
result <- text_personality(text, "----USERNMAE PASSWORD API KEY FOR PERSONALITY INSIGHTS ON BLUEMIX----")

And part of the results...

str(result)

List of 1 $ :List of 6 ..$ id : chr "UNKNOWN" ..$ source : chr "UNKNOWN" ..$ word_count : int 13719 ..$ processed_lang: chr "en" ..$ tree :List of 3 .. ..$ id : chr "r" .. ..$ name : chr "root" .. ..$ children:'data.frame': 3 obs. of 3 variables: .. .. ..$ id : chr [1:3] "personality" "needs" "values" .. .. ..$ name : chr [1:3] "Big 5" "Needs" "Values" .. .. ..$ children:List of 3 .. .. .. ..$ :'data.frame': 1 obs. of 5 variables: .. .. .. .. ..$ id : chr "Openness_parent" .. .. .. .. ..$ name : chr "Openness" .. .. .. .. ..$ category : chr "personality" .. .. .. .. ..$ percentage: num 0.985 .. .. .. .. ..$ children :List of 1 .. .. .. .. .. ..$ :'data.frame': 5 obs. of 6 variables: .. .. .. .. .. .. ..$ id : chr [1:5] "Openness" "Conscientiousness" "Extraversion" "Agreeableness" ... .. .. .. .. .. .. ..$ name : chr [1:5] "Openness" "Conscientiousness" "Extraversion" "Agreeableness" ... .. .. .. .. .. .. ..$ category : chr [1:5] "personality" "personality" "personality" "personality" ... .. .. .. .. .. .. ..$ percentage : num [1:5] 0.985 0.207 0.158 0.087 0.746 .. .. .. .. .. .. ..$ sampling_error: num [1:5] 0.0464 0.0595 0.0452 0.0812 0.0754 .. .. .. .. .. .. ..$ children :List of 5 .. .. .. .. .. .. .. ..$ :'data.frame': 6 obs. of 5 variables: .. .. .. .. .. .. .. .. ..$ id : chr [1:6] "Adventurousness" "Artistic interests" "Emotionality" "Imagination" ... ... CONTINUES ...

petegordon commented 7 years ago

Let us know if there is any issue. Thanks.

georgemelpia commented 6 years ago

I get the same error! I have a bluemix account and have generated the service key username + password credentials and also have the API handy.

I get:

List of 1 $ :List of 3 ..$ code : int 400 ..$ sub_code: chr "S00016" ..$ error : chr "No version provided"

When I use:

result <- text_personality(text, "username:password")

And when I use the .Renviron file method:

result <- text_personality(text, "PERSONALITY_USERNAME_PASSWORD")

I get:

$ :List of 3 ..$ code : int 401 ..$ error : chr "Not Authorized" ..$ description: chr "2018-04-05T02:23:25-05:00, Error ERCDPLTFRM-NOAUTHZHDR occurred when accessing https://gateway.watsonplatform.net/personality-i"| __truncated

Any idea what might be going wrong for me?