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

User.create_marker() returns HTTP 404 Not Found #474

Closed
eelcohn opened this issue Dec 5, 2024 · 3 comments
Closed

User.create_marker() returns HTTP 404 Not Found #474

eelcohn opened this issue Dec 5, 2024 · 3 comments

Comments

@eelcohn
Copy link

eelcohn commented Dec 5, 2024

When I try to create a strean marker with TwitchIO v2.10.0 I get a HTTP 404 Not Found error:

    await self._api._user.create_marker(
  File "/opt/project/venv/lib/python3.12/site-packages/twitchio/user.py", line 750, in create_marker
    data = await self._http.post_stream_marker(token, user_id=str(self.id), description=description)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/project/venv/lib/python3.12/site-packages/twitchio/http.py", line 741, in post_stream_marker
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/project/venv/lib/python3.12/site-packages/twitchio/http.py", line 154, in request
    body, is_text = await self._request(route, path, headers, force_app_token=force_app_token)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/project/venv/lib/python3.12/site-packages/twitchio/http.py", line 253, in _request
    raise errors.HTTPException(f"Failed to fulfill the request", reason=resp.reason, status=resp.status)
twitchio.errors.HTTPException: 404: Failed to fulfill the request: Not Found

Possibly this is due to the call from post_stream_marker() is to a wrong Twitch API endpoint, see . It looks like it should be a function of the Stream() object, not the User() or PartialUser() object?

Copy link

github-actions bot commented Dec 5, 2024

Hello! Thanks for the issue. If this is a general help question, for a faster response consider joining the official Discord Server

Else if you have an issue with the library please wait for someone to help you here.

@chillymosh
Copy link
Collaborator

The endpoint is correct and this is supposed to be a PartialUser method.

The reasons for 404 are:

  • The user is not streaming live.
  • The ID in the user_id field is not valid (if user is manually created)
  • The user hasn't enabled video on demand (VOD).

@eelcohn
Copy link
Author

eelcohn commented Dec 5, 2024

Hi @chillymosh, thank you for your swift reply. In my case it's probably caused by the first reason: the user is not streaming live. I was trying to set the channel's tags before the user begins a livestream.

@eelcohn eelcohn closed this as completed Dec 5, 2024
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

No branches or pull requests

2 participants