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

word.name fails when there are several alternative words in the title #119

Closed
mostafa-mahmoud opened this issue Jan 2, 2021 · 0 comments · Fixed by #124
Closed

word.name fails when there are several alternative words in the title #119

mostafa-mahmoud opened this issue Jan 2, 2021 · 0 comments · Fixed by #124

Comments

@mostafa-mahmoud
Copy link

There are some expressions that have several commas in the title, these crash when ".name" property is used. For example:
diejenigen
allermindeste

>>> import duden
>>> for res in duden.search('allermindeste', exact=False):
...     print(res, res.name)
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/duden/word.py", line 59, in name
    name, _ = self.title.split(', ')
ValueError: too many values to unpack (expected 2)
>>> for res in duden.search('diejenige'):
...     print(res.name)
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/duden/word.py", line 59, in name
    name, _ = self.title.split(', ')
ValueError: too many values to unpack (expected 2)
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