Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'tuple' object has no attribute 'items' #1

Open
Jeff-Tian opened this issue Jun 4, 2019 · 0 comments
Open

AttributeError: 'tuple' object has no attribute 'items' #1

Jeff-Tian opened this issue Jun 4, 2019 · 0 comments

Comments

@Jeff-Tian
Copy link

➜ chwc
2019-06-04 15:53:54,556   DEBUG [command_history_wordcloud.command_history_wordcloud] stop words file = 'None'
2019-06-04 15:53:54,556    INFO [command_history_wordcloud.command_history_wordcloud] Started command_history_wordcloud.py.
2019-06-04 15:53:54,556   DEBUG [command_history_wordcloud.command_history_wordcloud] user home path  = '/Users/jefftian'
2019-06-04 15:53:54,560   DEBUG [command_history_wordcloud.command_history_wordcloud] shell path = '/bin/zsh'
2019-06-04 15:53:54,560   DEBUG [command_history_wordcloud.command_history_wordcloud] shell name = 'zsh'
2019-06-04 15:53:54,608   DEBUG [command_history_wordcloud.command_history_wordcloud] word frequencies count = 173
2019-06-04 15:53:54,608   DEBUG [command_history_wordcloud.command_history_wordcloud] stop words = set()
Traceback (most recent call last):
  File "/usr/local/bin/chwc", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/command_history_wordcloud/command_history_wordcloud.py", line 95, in main
    create_wordcloud(words, stop_words)
  File "/usr/local/lib/python3.7/site-packages/command_history_wordcloud/command_history_wordcloud.py", line 79, in create_wordcloud
    wordcloud = WordCloud(background_color="black", width=900, height=600, stopwords=stop_words).generate_from_frequencies(frequencies)
  File "/usr/local/lib/python3.7/site-packages/wordcloud/wordcloud.py", line 380, in generate_from_frequencies
    frequencies = sorted(frequencies.items(), key=itemgetter(1), reverse=True)
AttributeError: 'tuple' object has no attribute 'items'
@hatappo hatappo pinned this issue Sep 24, 2019
@hatappo hatappo unpinned this issue Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant