mr-teslaa / Taqwa-EDMS

A full school management website using flask. Full CRUD( create, read, update, delete ) facility
43 stars 22 forks source link

flask run fails with an Import error #27

Closed kami619 closed 5 months ago

kami619 commented 1 year ago

@mr-teslaa your application looks really cool, but I would like to try it out myself and hitting this error. Please let me know if I am doing something wrong here

here's the .flaskenv file

❯ cat .flaskenv
export FLASK_APP=run.py
export FLASK_ENV=development
export FLASK_DEBUG=1

running flask run fails with the below error

❯ flask run
 * Tip: There are .env or .flaskenv files present. Do "pip install python-dotenv" to use them.
 * Serving Flask app 'run.py' (lazy loading)
 * Environment: development
 * Debug mode: on
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

Error: While importing 'run', an ImportError was raised.
~/code/learn_python/Junior_School_and_College master*                                                                                                                             00:39:08
Junior_School_and_College ❯
mr-teslaa commented 10 months ago

@kami619, try to use your terminal instead

$ export FLASK_APP=run.py
$ export FLASK_ENV=development
or 
$ export FLASK_DEBUG=1
$ flask run
kami619 commented 10 months ago

@mr-teslaa

Thank you for reaching out, appreciate your time, still happens while using the terminal, as you suggested.

> export FLASK_APP=run.py
> export FLASK_ENV=development
> flask run
 * Tip: There are .env or .flaskenv files present. Do "pip install python-dotenv" to use them.
 * Serving Flask app 'run.py' (lazy loading)
 * Environment: development
 * Debug mode: on
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

Error: While importing 'run', an ImportError was raised.
mr-teslaa commented 8 months ago

@kami619

Could you please give me more information about your error, that would be great

NK-Inomine commented 8 months ago

I fixed thanks anyway. By the way If I need a full complete project about management systems using advanced flask features what is the process to work with you ?

On Fri, Jan 19, 2024 at 10:01 PM Hossain Foysal @.***> wrote:

@kami619 https://github.com/kami619

Could you please give me more information about your error, that would be great

— Reply to this email directly, view it on GitHub https://github.com/mr-teslaa/Junior_School_and_College/issues/27#issuecomment-1900476199, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEQ7ODXJHERLXGFG65AHCZTYPJ4C7AVCNFSM6AAAAAASHMWAB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBQGQ3TMMJZHE . You are receiving this because you commented.Message ID: @.***>

mr-teslaa commented 5 months ago

@NK-Inomine If you want to add new feature, describe your idea what you are thinking to add. Then you could create pull request. That's it