Coder Social home page Coder Social logo

Getting Started Error about home-assistant-notebooks HOT 2 OPEN

yozh avatar yozh commented on July 18, 2024 5
Getting Started Error

from home-assistant-notebooks.

Comments (2)

Vitani avatar Vitani commented on July 18, 2024

I think this is the fix

from sqlalchemy import text
...

for event in db.perform_query(text("SELECT * FROM events JOIN event_data ON events.data_id = event_data.data_id WHERE event_type = 'call_service' ORDER BY time_fired")):

from home-assistant-notebooks.

yozh avatar yozh commented on July 18, 2024

I think this is the fix

from sqlalchemy import text
...

for event in db.perform_query(text("SELECT * FROM events JOIN event_data ON events.data_id = event_data.data_id WHERE event_type = 'call_service' ORDER BY time_fired")):

Tried it....

for event in db.perform_query(text("SELECT * FROM events JOIN event_data ON events.data_id = event_data.data_id WHERE event_type = 'call_service' ORDER BY time_fired")):

and got this.


NameError Traceback (most recent call last)
Cell In[5], line 13
9 # We keep track of contexts that we processed so that we will only process
10 # the first service call in a context, and not subsequent calls.
11 context_processed = set()
---> 13 for event in db.perform_query(text("SELECT * FROM events JOIN event_data ON events.data_id = event_data.data_id WHERE event_type = 'call_service' ORDER BY time_fired")):
14 entity_ids = None
16 # Skip if we have already processed an event that was part of this context

NameError: name 'text' is not defined

from home-assistant-notebooks.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.