Skip to content

[v2.0 Issue] AttributeError with TurboWarp Events and None value in Google Colab #558

@NeuralNexusLab-nh

Description

@NeuralNexusLab-nh

Hello Tim,

I am using scratchattach v2.0 in Google Colab to build an AI chatbot, but I am having trouble connecting to TurboWarp cloud variables.

Project Link: https://scratch.mit.edu/projects/1259590165/ (running via TurboWarp)
My Code (Colab): https://colab.research.google.com/drive/1aVJpa2byWIw5HiUD7EVXTz_JIwiVyo62?usp=sharing

The main issues I encountered:

  1. AttributeError: I am trying to use sa.TwCloudEvents or cloud.events(), but it says the attribute doesn't exist. My dir(sa) shows TwCloud and get_tw_cloud, but I can't find the correct class for events in v2.0.
  2. Read Issue: When using cloud.get_var("connection"), it frequently returns None even when the variable is set in TurboWarp.

My Goal:
I want to listen to the connection variable. When it starts with [ask], I want to trigger google/gemini-2.5-flash-lite and update the variable with the response.

Could you please help me with the correct v2.0 syntax for handling TurboWarp cloud events?

Thank you for your help and for this amazing library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions