Skip to content

AttributeError: 'NoneType' object has no attribute 'isatty' #5498

@jukiewiczm

Description

@jukiewiczm

SQLMesh version 0.224.0

https://github.com/TobikoData/sqlmesh/blob/main/sqlmesh/__init__.py#L128

I realize this is not a particularly common use case, but I'm running SQLMesh in a constantly running service, where I spawn a process that will run SQLMesh (I spawn and not fork for general safety guarantees that spawn provides, the main process is heavily multithreaded, which is another reason why I simply dont run SQLMesh from the main process, as SQLMesh forks in addition).
Problem is, the spawned process doesn't inherit sys.stdin and in fact doesn't have any stdin at all, requiring me to implement an ugly workaround for this to work.
Therefore I believe the above line should have some None checks added to it before isatty() is called.

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