Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

YouPoll service broken? #177

Closed
chaorace opened this issue Oct 7, 2023 · 1 comment
Closed

YouPoll service broken? #177

chaorace opened this issue Oct 7, 2023 · 1 comment

Comments

@chaorace
Copy link

chaorace commented Oct 7, 2023

Hi, this is an issue we experienced while running the Lemmy fork and I wanted to document the issue on the upstream tracker for the sake of visibility! Credit where due: this problem was originally investigated and reported to me by the excellent @wjs018

Starting approximately on the morning of October 3rd, any post template utilizing the youpoll service began crashing the _create_post function, which in turn prevents holo from creating new posts. It doesn't appear to be due to a youpoll outage, so perhaps the API has changed? In either case, at minimum I feel that the service code should be updated to more gracefully recover from cases where the remote API does something unexpected like this.

Example Trace (note that the line numbers will be different from upstream, compare with code here for accurate mapping):

ERROR \| Unknown exception or error
--
Traceback (most recent call last):
File "/mount/efs/./lemmyml-holo/src/holo.py", line 49, in main
m.main(config, db, debug=config.debug)
File "/mount/efs/lemmyml-holo/src/module_find_episodes.py", line 77, in main
if _process_new_episode(config, db, show, stream, episode):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mount/efs/lemmyml-holo/src/module_find_episodes.py", line 121, in _process_new_episode
post_url = _create_post(config, db, show, stream, int_episode, submit=not config.debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mount/efs/lemmyml-holo/src/module_find_episodes.py", line 147, in _create_post
title, body = _create_post_contents(config, db, show, stream, display_episode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mount/efs/lemmyml-holo/src/module_find_episodes.py", line 178, in _create_post_contents
body = _format_post_text(config, db, config.post_body, config.post_formats, show, episode, stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mount/efs/lemmyml-holo/src/module_find_episodes.py", line 195, in _format_post_text
text = safe_format(text, poll=_gen_text_poll(db, config, formats, show, episode))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mount/efs/lemmyml-holo/src/module_find_episodes.py", line 309, in _gen_text_poll
poll_id = handler.create_poll(title, headers = {'User-Agent': config.useragent}, submit=not config.debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mount/efs/lemmyml-holo/src/services/poll/youpoll.py", line 58, in create_poll
return match.group(1)
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'
@chaorace
Copy link
Author

chaorace commented Oct 7, 2023

Nevermind! I see that this is already being addressed in #176

@chaorace chaorace closed this as completed Oct 7, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant