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

Server error at /feed endpoints #568

Closed
vitormarcal opened this issue Nov 3, 2023 · 0 comments · Fixed by #569
Closed

Server error at /feed endpoints #568

vitormarcal opened this issue Nov 3, 2023 · 0 comments · Fixed by #569

Comments

@vitormarcal
Copy link
Contributor

vitormarcal commented Nov 3, 2023

The RSS feed endpoints gives a server error 500.

linkding | 2023-11-03 13:16:06,794 ERROR Internal Server Error: /feeds/some_id/unread
linkding | Traceback (most recent call last):
linkding | File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner
linkding | response = get_response(request)
linkding | File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
linkding | response = wrapped_callback(request, *callback_args, **callback_kwargs)
linkding | File "/opt/venv/lib/python3.10/site-packages/django/contrib/syndication/views.py", line 40, in call
linkding | feedgen = self.get_feed(obj, request)
linkding | File "/opt/venv/lib/python3.10/site-packages/django/contrib/syndication/views.py", line 191, in get_feed
linkding | description = self._get_dynamic_attr("item_description", item)
linkding | File "/opt/venv/lib/python3.10/site-packages/django/contrib/syndication/views.py", line 103, in _get_dynamic_attr
linkding | return attr(obj)
linkding | File "/etc/linkding/./bookmarks/feeds.py", line 35, in item_description
linkding | return sanitize(item.resolved_description)
linkding | File "/etc/linkding/./bookmarks/feeds.py", line 21, in sanitize
linkding | return ''.join(ch for ch in text if ch in valid_chars or unicodedata.category(ch)[0] != 'C')
linkding | TypeError: 'NoneType' object is not iterable
linkding | [pid: 17|app: 0|req: 303/464] 171.18.0.30 () {68 vars in 1335 bytes} [Fri Nov 3 13:16:06 2023] GET /feeds/some_id/unread => generated 145 bytes in 66 msecs (HTTP/1.1 500) 8 headers in 282 bytes (1 switches on core 1)

I think is related to #565

sissbruecker pushed a commit that referenced this issue Nov 4, 2023
Previously, the 'sanitize' function would throw an error when 'text' was None. This commit fixes the issue by adding a check to handle the case where 'text' is None, returning an empty string instead.

Closes #568
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