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

crash on very long tokens #5

Closed
snarfed opened this issue Feb 1, 2017 · 1 comment · Fixed by #7
Closed

crash on very long tokens #5

snarfed opened this issue Feb 1, 2017 · 1 comment · Fixed by #7

Comments

@snarfed
Copy link
Collaborator

snarfed commented Feb 1, 2017

ran into this while working on snarfed/bridgy#723. not blocking me there, but figured it was worth tracking at least.

>>> brevity.shorten('X' * 141)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../brevity.py", line 231, in shorten
    return ''.join(t.content for t in tokens)
TypeError: sequence item 0: expected string or Unicode, NoneType found

tokens at this point is [None, u'\u2026'].

@kylewm
Copy link
Owner

kylewm commented Feb 1, 2017

whoa! weird, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants