Unable to upload files #57

Closed
opened 2022-01-29 17:37:51 +01:00 by Neptune14 · 1 comment

I've set up everything seemingly correctly. The home page works when looking at it from a browser. Sadly there are a couple errors that are happening.
I'm running the server with

flask run

Running it with flask will return the following error but the home page still shows up. Running it using ./fhost.py runserver or any command envolving fhost.py will only return the following error.

/usr/local/lib64/python3.6/site-packages/flask_sqlalchemy/__init__.py:852: UserWarning: Neither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set. Defaulting SQLALCHEMY_DATABASE_URI to "sqlite:///:memory:".
'Neither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set. '

Uploading files when the server is run through flask run will return the error that was mentioned in another issue.

sqlite3.OperationalError: no such table: file

The solution to that, running the db upgrade. Doesn't work because as mentioned, any command run using fhost doesn't work.

I'm on CENTOS 8 and yes I installed the python-sqlalchemy package through my package manager before installing through pip.

I've set up everything seemingly correctly. The home page works when looking at it from a browser. Sadly there are a couple errors that are happening. I'm running the server with ``` flask run ``` Running it with flask will return the following error but the home page still shows up. Running it using ./fhost.py runserver or any command envolving fhost.py will only return the following error. ``` /usr/local/lib64/python3.6/site-packages/flask_sqlalchemy/__init__.py:852: UserWarning: Neither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set. Defaulting SQLALCHEMY_DATABASE_URI to "sqlite:///:memory:". 'Neither SQLALCHEMY_DATABASE_URI nor SQLALCHEMY_BINDS is set. ' ``` Uploading files when the server is run through flask run will return the error that was mentioned in another issue. ``` sqlite3.OperationalError: no such table: file ``` The solution to that, running the db upgrade. Doesn't work because as mentioned, any command run using fhost doesn't work. I'm on CENTOS 8 and yes I installed the python-sqlalchemy package through my package manager before installing through pip.
Owner

You need to configure a database URI in instance/config.py, like so:

SQLALCHEMY_DATABASE_URI = "sqlite:///db.sqlite"
You need to configure a database URI in `instance/config.py`, like so: ```py SQLALCHEMY_DATABASE_URI = "sqlite:///db.sqlite" ```
mia closed this issue 2022-08-01 17:53:49 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: mia/0x0#57
No description provided.