Skip to content

Fixed: MATCH_FILE_PATH environment variable is not set #51

@jocamero

Description

@jocamero

Hi there! Thanks for sharing your code. Interesting project! Just wanted to provide some feedback that might be helpful to others.

I was required to add the following code snippet to main.py in order to get main.py to run. Prior to adding that I received errors (path edited to '~' for privacy). Confirming that the ~/PycharmProjects/hinge-data-analysis/.env file was edited with absolute paths for USER, MATCH, and MEDIA. Relative paths did not work.

*note I'm not a professional coder. I'm probably missing something simple, but this is how I got it to work. Feedback is welcome! =)

Error:

  File "~/PycharmProjects/hinge-data-analysis/app/analytics/MatchAnalytics.py", line 9, in __init__
    raise Exception("MATCH_FILE_PATH environment variable is not set.")
Exception: MATCH_FILE_PATH environment variable is not set.

Code snippet I added to the top of main.py

from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())  # loads ~/PycharmProjects/hinge-data-analysis/.env

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