hatbot-team / hatbot_resources

Repository for raw data and its processing
MIT License
1 stars 0 forks source link

некорректная работа классов Explanation и ExplanationKey #13

Closed ssmike closed 9 years ago

ssmike commented 9 years ago
>>> import hb_res.storage as st
>>> c = st.get_storage('Crosswords')

>>> list(c.entries())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mike/projects/hatbot_resources/hb_res/storage/FileExplanationStorage.py", line 21, in entries
    yield Explanation.decode(line.strip())
  File "/home/mike/projects/hatbot_resources/hb_res/explanations/Explanation.py", line 53, in decode
    .format(SEPARATOR, len(values), representation)
AssertionError: Encoded explanation should contain exactly 3 occurrences of '\t', not 4, as in 'солитер\tКрупный бриллиант\tejW8-1JEjXQjd7FCTF3R8QDIYQuP4OASp0-JgQ==\tNone'
>>> c.close()
>>> c = st.get_storage('Antonyms')
>>> list(c.entries())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mike/projects/hatbot_resources/hb_res/storage/FileExplanationStorage.py", line 21, in entries
    yield Explanation.decode(line.strip())
  File "/home/mike/projects/hatbot_resources/hb_res/explanations/Explanation.py", line 53, in decode
    .format(SEPARATOR, len(values), representation)
AssertionError: Encoded explanation should contain exactly 3 occurrences of '\t', not 4, as in 'абитуриент\tантоним к слову выпускник\tNyZAgVFd4Q6tp2RlhKd5fp2FJG-SfvbMNutCZA==\tNone'
>>> c.close()
moskupols commented 9 years ago

assert был некорректный.