This is caused by your data-updates.lua which assumes that because a capsule (aka item) with a name exists, an entity with that same name exists. This is not the case. Please make your function more intelligent at finding the spawned entity name or make it ignore the capsule if the entity does not exist.
at the moment I have no other possibility because I can't program and I have to talk to someone first who helped me with problems
I have already done smaller things but these were not so difficult