{"action":"created","issue":{"url":"https://api.github.com/repos/philferriere/mscstexta4r/issues/1","repository_url":"https://api.github.com/repos/philferriere/mscstexta4r","labels_url":"https://api.github.com/repos/philferriere/mscstexta4r/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/philferriere/mscstexta4r/issues/1/comments","events_url":"https://api.github.com/repos/philferriere/mscstexta4r/issues/1/events","html_url":"https://github.com/philferriere/mscstexta4r/issues/1","id":161428729,"number":1,"title":"Error in textaDetectTopics()","user":{"login":"andreaphsz","id":3206936,"avatar_url":"https://avatars.githubusercontent.com/u/3206936?v=3","gravatar_id":"","url":"https://api.github.com/users/andreaphsz","html_url":"https://github.com/andreaphsz","followers_url":"https://api.github.com/users/andreaphsz/followers","following_url":"https://api.github.com/users/andreaphsz/following{/other_user}","gists_url":"https://api.github.com/users/andreaphsz/gists{/gist_id}","starred_url":"https://api.github.com/users/andreaphsz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreaphsz/subscriptions","organizations_url":"https://api.github.com/users/andreaphsz/orgs","repos_url":"https://api.github.com/users/andreaphsz/repos","events_url":"https://api.github.com/users/andreaphsz/events{/privacy}","received_events_url":"https://api.github.com/users/andreaphsz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-21T12:52:11Z","updated_at":"2016-06-21T15:51:14Z","closed_at":null,"body":"I called:\r\n```\r\ntryCatch({\r\n\r\n  # Detect top topics\r\n  textaDetectTopics(\r\n    documents = documents, # At least 100 docs/sentences\r\n    stopWords = NULL,             # Stop word list (optional)\r\n    topicsToExclude = NULL,       # Topics to exclude (optional)\r\n    minDocumentsPerWord = NULL,   # Threshold to exclude rare topics (optional)\r\n    maxDocumentsPerWord = NULL,   # Threshold to exclude ubiquitous topics (optional)\r\n    resultsPollInterval = 30L,    # Poll interval (in s, default: 30s, use 0L for async)\r\n    resultsTimeout = 1200L,       # Give up timeout (in s, default: 1200s = 20mn)\r\n    verbose = FALSE               # If set to TRUE, print every poll status to stdout\r\n  )\r\n\r\n}, error = function(err) {\r\n\r\n  # Print error\r\n  geterrmessage()\r\n\r\n})\r\n```\r\nand got the error:\r\n```\r\ntextatopics [https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/topics?]\r\nstatus: Failed\r\noperationId: 0c0783bf1f484dc6a34b6df7198f*\r\noperationType: topics\r\nFehler in if (nrow(x$topics) > 20) cat(\"topics (first 20):\\n\", sep = \"\") else cat(\"topics:\\n\",  : \r\n  Argument hat Länge 0\r\n```\r\nAny idea?"},"comment":{"url":"https://api.github.com/repos/philferriere/mscstexta4r/issues/comments/227484095","html_url":"https://github.com/philferriere/mscstexta4r/issues/1#issuecomment-227484095","issue_url":"https://api.github.com/repos/philferriere/mscstexta4r/issues/1","id":227484095,"user":{"login":"philferriere","id":6441756,"avatar_url":"https://avatars.githubusercontent.com/u/6441756?v=3","gravatar_id":"","url":"https://api.github.com/users/philferriere","html_url":"https://github.com/philferriere","followers_url":"https://api.github.com/users/philferriere/followers","following_url":"https://api.github.com/users/philferriere/following{/other_user}","gists_url":"https://api.github.com/users/philferriere/gists{/gist_id}","starred_url":"https://api.github.com/users/philferriere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philferriere/subscriptions","organizations_url":"https://api.github.com/users/philferriere/orgs","repos_url":"https://api.github.com/users/philferriere/repos","events_url":"https://api.github.com/users/philferriere/events{/privacy}","received_events_url":"https://api.github.com/users/philferriere/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T15:51:14Z","updated_at":"2016-06-21T15:51:14Z","body":"Thank you for reporting the issue, Andrea!\r\n\r\nThe package's auto print function is trying to print a list of topics, even though the topic detection operation clearly failed (as indicated by the status message). I'll work on making the auto print function more robust (it's too naive, right now).\r\n\r\nMeanwhile, you can try and debug why it failed by digging into the details of the servers' JSON response. If you rewrite your code as:\r\n\r\n`myTopics<- textaDetectTopics(blah blah)`\r\n\r\nThe field `myTopics$json` will contain the details of the servers' response. Do you see any information in there that may help you understand what the problem is?\r\n\r\nAlso, `textaDetectLanguages()` tells me that `Argument hat Länge 0` is German. At this point, MS Cognitive Services only supports English. Just to be sure -- what's the language of the documents you're trying to detect topics for?\r\n\r\nIf you still can't figure out what the issue is afterwards, can you provide a small input sample that triggers the problem?"}}
{"actor":{"display_login":"philferriere"}}