Oct 12, 4:35pm

changeUI is None because your __enter__ method doesn't return anything, and with ... as changeUI assigns the return value of __enter__ to changeUI. A function with no return statement returns None by default.

Also note: even if __enter__ did return self.initialAppId, it would still print None the first time, because self.initialAppId is set to None in __init__.

The fix:

python
def __enter__(self):
    self.initialAppId = True
    return self  # or return self.initialAppId

Now changeUI will be the ChangeUI instance (or True, depending on what you return).

Oct 12, 4:35pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more