to-dos.py
import streamlit as st
import get_todos
todos = get_todos.getTodos()
def add_todos():
todo1 = st.session_state["new_todo"] + "\n"
todos.append(todo1)
get_todos.writeTodos(todos)
st.title("My TO-DO App")
...
get_todos.py
def getTodos():
with open("docs.txt", "r") as file:
data = file.readlines()
return data
def writeTodos(adder):
with open("docs.txt", "w") as file:
file.writelines(adder)
I built a TO-DO App in Python using streamlit
While performing this task in terminal, it's continuously showing
'FileNotFoundError'
meanwhile the file actually exist.
What could be the problem ? Any syntax error? or Logical Error?