Skip to content

NameError: name 'now' is not defined #834

Description

@shashchatter

This is a new error, got on first HA restart after updating pyScript to 2.0.0 and HA to 2026.4.4.

2026-05-05 16:00:00.012 ERROR (MainThread) [custom_components.pyscript.function] run_coro: got exception Traceback (most recent call last):
File "/config/custom_components/pyscript/eval.py", line 936, in aeval
raise NameError(f"name '{val.name}' is not defined")
NameError: name 'now' is not defined

PyScript: 2.0.0

Installation method Home Assistant Container
Core 2026.4.4
Frontend 20260325.8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions