{"action":"created","issue":{"url":"https://api.github.com/repos/amueller/word_cloud/issues/446","repository_url":"https://api.github.com/repos/amueller/word_cloud","labels_url":"https://api.github.com/repos/amueller/word_cloud/issues/446/labels{/name}","comments_url":"https://api.github.com/repos/amueller/word_cloud/issues/446/comments","events_url":"https://api.github.com/repos/amueller/word_cloud/issues/446/events","html_url":"https://github.com/amueller/word_cloud/issues/446","id":376151777,"node_id":"MDU6SXNzdWUzNzYxNTE3Nzc=","number":446,"title":"KeyError: 'foo' building simple word cloud with spaces in words","user":{"login":"jaraco","id":308610,"node_id":"MDQ6VXNlcjMwODYxMA==","avatar_url":"https://avatars2.githubusercontent.com/u/308610?v=4","gravatar_id":"","url":"https://api.github.com/users/jaraco","html_url":"https://github.com/jaraco","followers_url":"https://api.github.com/users/jaraco/followers","following_url":"https://api.github.com/users/jaraco/following{/other_user}","gists_url":"https://api.github.com/users/jaraco/gists{/gist_id}","starred_url":"https://api.github.com/users/jaraco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaraco/subscriptions","organizations_url":"https://api.github.com/users/jaraco/orgs","repos_url":"https://api.github.com/users/jaraco/repos","events_url":"https://api.github.com/users/jaraco/events{/privacy}","received_events_url":"https://api.github.com/users/jaraco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-31T20:42:17Z","updated_at":"2018-11-05T18:36:24Z","closed_at":null,"author_association":"NONE","body":"#### Description\r\n\r\nAttempting to build a word cloud from a file containing one phrase per line results in KeyError.\r\n\r\n#### Steps/Code to Reproduce\r\n```\r\n$ echo 'Foo Bar\\nFoo Bar\\n' | rwt wordcloud -- -m wordcloud --imagefile authors.png --regexp '[ \\w]+'\r\nCollecting wordcloud\r\n  Using cached https://files.pythonhosted.org/packages/c7/07/e43a7094a58e602e85a09494d9b99e7b5d71ca4789852287386e21e74c33/wordcloud-1.5.0-cp37-cp37m-macosx_10_6_x86_64.whl\r\nCollecting numpy>=1.6.1 (from wordcloud)\r\n  Using cached https://files.pythonhosted.org/packages/a8/e1/838e35e6f44e2bc19bf902e945c34ae730a33a8e346d6208bf7c4d751416/numpy-1.15.3-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl\r\nCollecting pillow (from wordcloud)\r\n  Using cached https://files.pythonhosted.org/packages/99/c8/550f3416afe7b6726efc8a7f2249a38d6ae65c3514ef6c36bdc8485868b7/Pillow-5.3.0-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl\r\nInstalling collected packages: numpy, pillow, wordcloud\r\nSuccessfully installed numpy-1.15.3 pillow-5.3.0 wordcloud-1.5.0\r\nTraceback (most recent call last):\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py\", line 193, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-21h77osc/wordcloud/__main__.py\", line 37, in <module>\r\n    main()\r\n  File \"/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-21h77osc/wordcloud/__main__.py\", line 33, in main\r\n    wordcloud_cli_main(*wordcloud_cli_parse_args(sys.argv[1:]))\r\n  File \"/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-21h77osc/wordcloud/wordcloud_cli.py\", line 89, in main\r\n    wordcloud.generate(text)\r\n  File \"/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-21h77osc/wordcloud/wordcloud.py\", line 605, in generate\r\n    return self.generate_from_text(text)\r\n  File \"/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-21h77osc/wordcloud/wordcloud.py\", line 586, in generate_from_text\r\n    words = self.process_text(text)\r\n  File \"/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-21h77osc/wordcloud/wordcloud.py\", line 563, in process_text\r\n    word_counts = unigrams_and_bigrams(words, self.normalize_plurals)\r\n  File \"/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/rwt-21h77osc/wordcloud/tokenization.py\", line 55, in unigrams_and_bigrams\r\n    word1 = standard_form[bigram[0].lower()]\r\nKeyError: 'foo'\r\n```\r\n\r\n#### Expected Results\r\n\r\nA wordcloud should be generated with \"Foo Bar\" as the only phrase.\r\n\r\n#### Versions\r\n\r\n```\r\nDarwin-18.0.0-x86_64-i386-64bit\r\nPython 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 03:13:28)\r\n[Clang 6.0 (clang-600.0.57)]\r\n```\r\n\r\nOther versions appear above."},"comment":{"url":"https://api.github.com/repos/amueller/word_cloud/issues/comments/435985069","html_url":"https://github.com/amueller/word_cloud/issues/446#issuecomment-435985069","issue_url":"https://api.github.com/repos/amueller/word_cloud/issues/446","id":435985069,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTk4NTA2OQ==","user":{"login":"jaraco","id":308610,"node_id":"MDQ6VXNlcjMwODYxMA==","avatar_url":"https://avatars2.githubusercontent.com/u/308610?v=4","gravatar_id":"","url":"https://api.github.com/users/jaraco","html_url":"https://github.com/jaraco","followers_url":"https://api.github.com/users/jaraco/followers","following_url":"https://api.github.com/users/jaraco/following{/other_user}","gists_url":"https://api.github.com/users/jaraco/gists{/gist_id}","starred_url":"https://api.github.com/users/jaraco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaraco/subscriptions","organizations_url":"https://api.github.com/users/jaraco/orgs","repos_url":"https://api.github.com/users/jaraco/repos","events_url":"https://api.github.com/users/jaraco/events{/privacy}","received_events_url":"https://api.github.com/users/jaraco/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T18:36:24Z","updated_at":"2018-11-05T18:36:24Z","author_association":"NONE","body":"I really need to rename it to `pip-run` for searchability and a more intuitive name. [rwt is here](https://pypi.org/project/rwt). It uses pip to install packages on demand in a temporary environment."}}
{"actor":{"display_login":"jaraco"}}