Skip to content

Getting a 404 when creating a new entry #84

@stevefusaro

Description

@stevefusaro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions