Hi! I am trying to run prefect orion, but I am get...
# ask-community
a
Hi! I am trying to run prefect orion, but I am getting this error Can you please help? I have tried it on WSL, Windows10, linux. I am getting the same error on all three platforms. $prefect orion start $prefect version 2.0a3
a
Hi @Akarshan Arora, how do you install Orion? When you type
prefect version
in your terminal, which version does it show? I would suggest reinstalling using:
Copy code
pip install -U "prefect>=2.0.0a"
And if this doesn’t help, you can create a new sqlite database in a directory of your choice and set env variable pointing Orion to this database:
Copy code
sqlite3 orion.db
export PREFECT_ORION_DATABASE_CONNECTION_URL=sqlite+aiosqlite:///orion.db
a
Hi @Anna Geller, I installed using the same command. I tried your approach of pre-creating a sqlite db. Now I am getting different erro
Copy code
File "/mnt/c/Users/akarshan/python_proj/prefect_orion/.env/lib/python3.8/site-packages/aiosqlite/core.py", line 102, in run
    result = function()
sqlite3.OperationalError: no such table: flow_run
a
@Akarshan Arora that’s interesting. So now Orion recognizes your DB. Did you run this VACUUM? I think once you start Orion, it will try to recreate all tables. You can also try:
Copy code
prefect orion reset-db
upvote 1
a
Thanx @Anna Geller I am not getting any error after using this command. I am able to invoke orion without any errors.
👍 2
j
Hey, I and my friend got the same error, which we managed to fix with the commands above. But, it seems to be happening quite often. Just a feedback 🙂
👍 1
k
I wrote an issue for this already
👍 1
c
Hello, getting the same error when trying out orion
Copy code
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
None of the commands below worked for me:
Copy code
prefect orion reset-db
Copy code
sqlite3 orion.db
export PREFECT_ORION_DATABASE_CONNECTION_URL=sqlite+aiosqlite:///orion.db
I am using Prefect
2.0a3
, Python
3.8.11
k
Will ask the team and get back to you tom on that
a
@CA Lee can you try to do this in a fresh new virtual environment?
Copy code
pip install -U "prefect>=2.0.0a"
prefect version # send it to us if it something shouldn't work
prefect orion start
and then if for some reason this doesn’t work, you can reset the DB:
Copy code
prefect orion reset-db
prefect orion start
And if even then DB should not work, then create a new database and point Prefect to it via env variable:
Copy code
sqlite3 orion.db
export PREFECT_ORION_DATABASE_CONNECTION_URL=sqlite+aiosqlite:///orion.db
Let us know if you still face any issues.
z
We should have a fix for this in the next alpha
👍 1
(which hopefully we can get out today)
p
Hi! I'm having this issue as well. I've followed the steps posted by @Anna Geller and get the error
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
every time. Prefect version 2.0a6 (also tested with latest from GitHub), Python 3.9.5/3.10.0, Windows 10. Any idea how to solve this?
a
@Peter honestly, all I can recommend is pretty much the same as above. Start a new fresh virtual environment, within it install Orion and start it. If this still shows sqlite3 issues, try to reset DB:
Copy code
prefect orion reset-db
prefect orion start
If this still doesn’t work, cross-check your sqlite3 version. I saw one user who was somehow using a version from 2019.
Copy code
sqlite3 version
should give you for Orion 2.0a6:
Copy code
SQLite version 3.36.0 2021-06-18 18:36:39
z
We don't test on Windows yet and there are some known issues. Was it working previously?
p
Yeah, I'm on
SQLite version 3.36.0 2021-06-18
in a fresh virtual environment (using conda), so probably not that. Maybe a Windows issue. I'll try it in WSL when I get the time. This is the first time I've tried running Orion and I haven't been able to make it work yet (but it looks awesome!). Regular Prefect works, so I guess I'll stick with that for now, but I'm excited for what's to come!
🙌 1
z
Yeah sorry about that, we’ve definitely got a few compatibility issues with Windows that will take some dedicated time to investigate.