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

[Python3.5] AttributeError: 'dict' object has no attribute 'iteritems' #7

Closed
coughlanio opened this issue Apr 27, 2016 · 1 comment · Fixed by #6
Closed

[Python3.5] AttributeError: 'dict' object has no attribute 'iteritems' #7

coughlanio opened this issue Apr 27, 2016 · 1 comment · Fixed by #6

Comments

@coughlanio
Copy link

The above issue occurs when trying to run the following code:

import RAKE
import os

rake = RAKE.Rake(os.path.dirname(__file__) + '/../stoplist/japanese.stop')
text = 'これそれあれこのそのあの'
keywords = rake.run(text)
print(keywords)

Here's the stacktrace:

Traceback (most recent call last):
  File "/vagrant/workspace/bambooshoot-ads/analytics/core/keyword.py", line 6, in <module>
    keywords = rake.run(text)
  File "/home/vagrant/.pyenv/versions/3.5.0/lib/python3.5/site-packages/RAKE/RAKE.py", line 132, in run
    sorted_keywords = sorted(keyword_candidates.iteritems(), key=operator.itemgetter(1), reverse=True)
AttributeError: 'dict' object has no attribute 'iteritems'

Appears to be an issue in the original code, as you can see here: aneesha/RAKE#9

I've attempted the above fix without success.

@coughlanio
Copy link
Author

My bad, appears there's a PR already open with a fix for this.

Is there any timeline on the PR being merged to master?

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

Successfully merging a pull request may close this issue.

1 participant