Skip to content

crash on very long tokens #5

Closed
@snarfed

Description

@snarfed

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'].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions