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

Getting a 404 when creating a new entry #84

Open
stevefusaro opened this issue Dec 9, 2022 · 2 comments
Open

Getting a 404 when creating a new entry #84

stevefusaro opened this issue Dec 9, 2022 · 2 comments

Comments

@stevefusaro
Copy link

stevefusaro commented Dec 9, 2022

I'm suddenly getting a 404 when creating a new entry. I'm not sure what could have changed, the last time I successfully ran this code was months ago. The entry create function takes an entry id but when I call it I get an error saying the entry id could not be found.

The code

self.client\
    .entries(self.SPACE_ID, self.ENV_ID)\
    .create(str(uuid.uuid4()), attributes)

The error

Traceback (most recent call last):
  File "src/handle_changes.py", line 55, in <module>
    main()
  File "src/handle_changes.py", line 52, in main
    handle_changes(past_versions, differ, contentful_api)
  File "src/handle_changes.py", line 26, in handle_changes
    api_sys_id = contentful_api.get_or_create_api(api_id)
  File "/repo/src/contentful_service.py", line 147, in get_or_create_api
    api = self.management_api.create_api_entry(api_id)
  File "/repo/src/contentful_service.py", line 59, in create_api_entry
    api = self.client\
  File "/pyenv/versions/3.8.10/lib/python3.8/site-packages/contentful_management/entries_proxy.py", line 72, in create
    return super(EntriesProxy, self).create(resource_id=resource_id, attributes=attributes)
  File "/pyenv/versions/3.8.10/lib/python3.8/site-packages/contentful_management/client_proxy.py", line 72, in create
    result = self.client._put(
  File "/pyenv/versions/3.8.10/lib/python3.8/site-packages/contentful_management/client.py", line 789, in _put
    return self._request('put', url, attributes, **kwargs)
  File "/pyenv/versions/3.8.10/lib/python3.8/site-packages/contentful_management/client.py", line 757, in _request
    raise error
contentful_management.errors.NotFoundError: HTTP status code: 404
Message: The resource could not be found.
Details: The requested Entry could not be found. ID: ae823fe8-e41e-408c-9da6-b45cd08d96ec.
Request ID: db9c022a-574e-487c-8e56-1abe40492e54

Update: I've had version 2.11.0 pinned since we started working on this

@rubydog
Copy link
Collaborator

rubydog commented Dec 14, 2022

@stevefusaro You are using the latest version so thats alright, I will check what can be the issue. Will keep you posted.

Cheers

@rubydog
Copy link
Collaborator

rubydog commented Oct 11, 2023

@stevefusaro Is this fixed or does the issue still persist?

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