Skip to content

Deployment fails with Python error "ModuleNotFoundError: No module named 'dotenv'" #60

@ollietreend

Description

@ollietreend

I've created a repo using the Express app quickstart (Node.js) from https://container-hosting.anotherwebservice.com – and haven't made any changes to it yet.

The .container-hosting/deploy.sh script keeps failing to deploy the project via GitHub Actions. It seems to connect successfully to the Dokku host, and then the /home/dokku/dokku-wrapper.py script fails with error ModuleNotFoundError: No module named 'dotenv'.

Here are the relevant lines from the deployment log:

+ amber exec -- sh -c 'ssh -F /dev/null dokku@$DOKKU_HOST -C $CONTAINER_HOSTING_API_KEY dokku apps:create $APP_NAME || true'
Traceback (most recent call last):
  File "/home/dokku/dokku-wrapper.py", line 2, in <module>
Running dokku wrapper
    from dotenv import load_dotenv
ModuleNotFoundError: No module named 'dotenv'
+ amber exec -- sh -c 'ssh -F /dev/null dokku@$DOKKU_HOST -C $CONTAINER_HOSTING_API_KEY dokku builder:set $APP_NAME build-dir src'
Traceback (most recent call last):
  File "/home/dokku/dokku-wrapper.py", line 2, in <module>
Running dokku wrapper
    from dotenv import load_dotenv
ModuleNotFoundError: No module named 'dotenv'
Error: Process completed with exit code 1.

or you can see the entire log here.

@chrisjsimpson Do you know if the Dokku host is missing the dotenv Python module? 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions