Unable to successfully run astro in Windows 10 CLI

Trying to load and run Astro using the Windows CLI (not WSL) and it appears to be loaded successfully when I execute the version command.

When I run it, however, two of the containers (the scheduler and webserver) just seem to restart continually and I’m obviously unable to view Airflow in my browser. The accompanying log entries are below:

Waiting for host: postgres 5432
[2021-01-08 11:34:19,355] {plugins_manager.py:231} ERROR - No module named 'flask_admin'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/airflow/plugins_manager.py", line 222, in load_plugins_from_plugin_directory
    loader.exec_module(mod)
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/airflow/plugins/example-plugin.py", line 2, in <module>
    from flask_admin.base import MenuLink
ModuleNotFoundError: No module named 'flask_admin'
[2021-01-08 11:34:19,360] {plugins_manager.py:232} ERROR - Failed to import plugin /usr/local/airflow/plugins/example-plugin.py
[2021-01-08 11:34:23,402] {plugins_manager.py:286} INFO - Loading 1 plugin(s) took 4.06 seconds
usage: airflow [-h] GROUP_OR_COMMAND ...

positional arguments:
  GROUP_OR_COMMAND

    Groups:
      celery         Celery components
      config         View configuration
      connections    Manage connections
      dags           Manage DAGs
      db             Database operations
      kubernetes     Tools to help run the KubernetesExecutor
      pools          Manage pools
      providers      Display providers
      roles          Manage roles
      tasks          Manage tasks
      users          Manage users
      variables      Manage variables

    Commands:
      cheat-sheet    Display cheat sheet
      info           Show information about current Airflow and environment
      kerberos       Start a kerberos ticket renewer
      plugins        Dump information about loaded plugins
      rotate-fernet-key
                     Rotate encrypted connection credentials and variables
      scheduler      Start a scheduler instance
      sync-perm      Update permissions for existing roles and DAGs
      version        Show the version
      webserver      Start a Airflow webserver instance

optional arguments:
  -h, --help         show this help message and exit

airflow command error: argument GROUP_OR_COMMAND: `airflow upgradedb` command, has been removed, please use `airflow db upgrade`, see help above.

Hi Mark, having this very same issue, did you manage to solve it?

Thanks

Just for reference, we were running an old astro version against a newer airflow.

Download the lastest windows cli and it will work fine 0.23.2 (as of 1/13).

1 Like

I’ll give that a try. I did not solve it. I thought I had downloaded the most recent version, but perhaps I didn’t. I then went down the path of installing wsl2 to try that path, but having issues there as well.

If you followed this guide GitHub - astronomer/astro-cli: CLI that makes it easy to create, test and deploy Airflow DAGs to Astronomer it links to version astro_0.13.1_windows_386.zip (May-20), you can find the latest windows CLI here Releases · astronomer/astro-cli · GitHub.

1 Like

That was, in fact, the issue. Thanks.

Yo @MarkEvansHW thanks for bringing this up! I just created a PR so that (hopefully) nobody runs into this same issue in the future: Updated Windows instructions to always point to most recent CLI version by jwitz · Pull Request #399 · astronomer/astro-cli · GitHub

1 Like