Skip to content

Commit

Permalink
Merge pull request #280 from ben-29/hr_fix
Browse files Browse the repository at this point in the history
fix: "unable to open database file" when run scripts from `scripts` folder
  • Loading branch information
yihong0618 authored Jul 16, 2022
2 parents 15f04c3 + fc42bca commit 05efcbc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/config.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import os
from collections import namedtuple

import yaml

# getting content root directory
current = os.path.dirname(os.path.realpath(__file__))
parent = os.path.dirname(current)

GET_DIR = "activities"
OUTPUT_DIR = "activities"
GPX_FOLDER = os.path.join(os.getcwd(), "GPX_OUT")
TCX_FOLDER = os.path.join(os.getcwd(), "TCX_OUT")
GPX_FOLDER = os.path.join(parent, "GPX_OUT")
TCX_FOLDER = os.path.join(parent, "TCX_OUT")
FOLDER_DICT = {
"gpx": GPX_FOLDER,
"tcx": TCX_FOLDER,
}
SQL_FILE = os.path.join(os.getcwd(), "scripts", "data.db")
JSON_FILE = os.path.join(os.getcwd(), "src", "static", "activities.json")
SQL_FILE = os.path.join(parent, "scripts", "data.db")
JSON_FILE = os.path.join(parent, "src", "static", "activities.json")

# TODO: Move into nike_sync
BASE_URL = "https://api.nike.com/sport/v3/me"
Expand Down

1 comment on commit 05efcbc

@vercel
Copy link

@vercel vercel bot commented on 05efcbc Jul 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

running-page – ./

running-page-git-master-yihong0618.vercel.app
running-page-yihong0618.vercel.app
running-page.vercel.app

Please sign in to comment.