Skip to content

ModuleNotFoundError when importing BookReview in app.py #1

@faizanxmulla

Description

@faizanxmulla

Description :

I am facing an issue with importing the BookReview class in my app.py file. The code works perfectly fine when running locally; however, I encounter a ModuleNotFoundError when deploying the application, specifically on the Render platform.

Steps to reproduce :

  1. Clone the repository - Link
  2. Navigate to the project directory - Implementing REST API's
  3. Run the application locally using : python app.py
  4. Confirm that the application runs without any import errors.
  5. Deploy the application on Render.
  6. Observe the ModuleNotFoundError: No module named 'book_review' error during deployment.

Expected Behavior :

The BookReview class should be successfully imported both locally and when deployed on Render, and the application should run without any import errors in both environments.

Actual Behavior :

The code works without issues when running locally but encounters a ModuleNotFoundError when deploying on Render.

Additional Information :

  • Python version - 3.8.10
  • Render build command - cd "Implementing REST API's" && pip install -r requirements.txt
  • Render start command - gunicorn "Implementing REST API's.app:app"

Relevant Links :

Screenshots :

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions