edsl icon indicating copy to clipboard operation
edsl copied to clipboard

Incorrect error message shown when object uuid is not passed to Coop client patch() method

Open rbyh opened this issue 6 months ago • 2 comments

Notebook showing this error: https://chick.expectedparrot.com/content/6cfe0ebb-15a1-449b-8c21-7a999945d327

No issues posting objects to Coop directly or using Coop client object. No issues using the patch() method directly or using Coop client object. When I do not pass the object uuid to the object's patch() method I get a clear correct error message that the uuid is missing. Problem: When I do not pass the object uuid to the Coop client's patch() method I get an error message that I am missing an API key.

To reproduce:

from edsl import QuestionMultipleChoice, Coop

q = QuestionMultipleChoice(
	question_name = "primary_color",
	question_text = "What is your favorite primary color?",
    question_options = ["Red", "Yellow", "Blue"]
)

q.push()

c = Coop()

c.patch(q, visibility="public") # This should generate an error message that I forgot the uuid

rbyh avatar Aug 02 '24 14:08 rbyh