Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'NoneType' object has no attribute 'wait' with airflow db shell on SQLite #12806

Closed
marclamberti opened this issue Dec 4, 2020 · 0 comments · Fixed by #13907
Closed

'NoneType' object has no attribute 'wait' with airflow db shell on SQLite #12806

marclamberti opened this issue Dec 4, 2020 · 0 comments · Fixed by #13907
Labels
affected_version:2.0 Issues Reported for 2.0 kind:bug This is a clearly a bug priority:low Bug with a simple workaround that would not block a release

Comments

@marclamberti
Copy link

Apache Airflow version: 2.0.0b3

Kubernetes version (if you are using kubernetes) (use kubectl version):

Environment:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release): Ubuntu 20.04.1 LTS
  • Kernel (e.g. uname -a): Linux airflowvm 5.4.0-56-generic Adding ftp hook #62-Ubuntu SMP Mon Nov 23 19:20:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
  • Others:

What happened:

After connecting to SQLite with airflow db shell
And exiting the shell with.quit

I got the following error:

[2020-12-04 07:31:28,506] {process_utils.py:149} INFO - Executing cmd: sqlite3 /home/airflow/airflow/airflow.db
SQLite version 3.31.1 2020-01-27 19:55:54
Enter ".help" for usage hints.
sqlite> ;
sqlite> .quit
Traceback (most recent call last):
  File "/home/airflow/sandbox/bin/airflow", line 8, in <module>
    sys.exit(main())
  File "/home/airflow/sandbox/lib/python3.8/site-packages/airflow/__main__.py", line 40, in main
    args.func(args)
  File "/home/airflow/sandbox/lib/python3.8/site-packages/airflow/cli/cli_parser.py", line 50, in command
    return func(*args, **kwargs)
  File "/home/airflow/sandbox/lib/python3.8/site-packages/airflow/utils/cli.py", line 86, in wrapper
    return f(*args, **kwargs)
  File "/home/airflow/sandbox/lib/python3.8/site-packages/airflow/cli/commands/db_command.py", line 78, in shell
    execute_interactive(["sqlite3", url.database]).wait()
AttributeError: 'NoneType' object has no attribute 'wait'

What you expected to happen:

No error when exiting the session.
Looks like this execute_interactive(["sqlite3", url.database]) returns None

How to reproduce it:

airflow db shell
sqlite> .quit

Anything else we need to know:

I love this new command :)

@marclamberti marclamberti added the kind:bug This is a clearly a bug label Dec 4, 2020
@vikramkoka vikramkoka added priority:low Bug with a simple workaround that would not block a release affected_version:2.0 Issues Reported for 2.0 labels Dec 4, 2020
kaxil pushed a commit that referenced this issue Jan 26, 2021
kaxil pushed a commit that referenced this issue Jan 27, 2021
closes: #12806

(cherry picked from commit 0d1c39a)
kaxil pushed a commit that referenced this issue Feb 4, 2021
closes: #12806

(cherry picked from commit 0d1c39a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:2.0 Issues Reported for 2.0 kind:bug This is a clearly a bug priority:low Bug with a simple workaround that would not block a release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants