marketcalls / openalgo

Open Source Algo Trading Platform for Everyone
https://docs.openalgo.in
GNU Affero General Public License v3.0
150 stars 68 forks source link

DB file is missing in the repo #69

Closed Paragkk closed 3 weeks ago

Paragkk commented 3 weeks ago

openalgo.db file is not present in the repo. Where can i get the empty db file please

marketcalls commented 3 weeks ago

Hi DB will be created when you start the application in your machine for the first time. It is not a good idea and practice to share the DB in the repo

Paragkk commented 3 weeks ago

Thanks a lot for your response. It seems the db is not getting created due to some permission issue. I will have to dig further.

marketcalls commented 3 weeks ago

Let me know which OS you are trying to Integrate openalgo. Only for Linux it demands permissions.

Paragkk commented 3 weeks ago

I am trying on windows 10 itself. Attaching the error log. error.txt

marketcalls commented 3 weeks ago

Running the Python script using the full path versus running it from the directory can cause issues, especially with relative paths and imports. Here's why:

  1. When you run python3 "c:\Users\parag\PyCodes\AWS codes\openalgo\app.py" from a different directory:

    • Python sets the working directory (os.getcwd()) to the directory you're running the command from
    • This can cause issues with relative paths in your code
    • Module imports might fail if they rely on the Python path being set relative to the project root
  2. When you run python3 app.py from the project directory:

    • The working directory is correctly set to your project root
    • Relative imports work as expected
    • File paths resolve correctly relative to the project root

Here's how to fix this:

  1. Change to the project directory first, then run the app:
    cd "c:\Users\parag\PyCodes\AWS codes\openalgo"
    python3 app.py
Paragkk commented 3 weeks ago

Thanks a lot. its working now. 👯‍♂️

marketcalls commented 3 weeks ago

I'm glad you are able to fix the issue!