issue with loading the wiki / csv due to path issue

This commit is contained in:
rattatwinko
2025-04-16 18:20:19 +02:00
parent 03229c2524
commit 63a5ced60a

View File

@@ -10,7 +10,7 @@ def select_file(callback=None):
if choice == "Wiki": if choice == "Wiki":
open_wiki() open_wiki()
else: else:
filename = os.path.join("wiki", "listeSPAR.csv" if choice == "SPAR" else "listeHOFER.csv") filename = os.path.join("PfandApplication/wiki", "listeSPAR.csv" if choice == "SPAR" else "listeHOFER.csv")
if callback: if callback:
callback(filename) callback(filename)
else: else:
@@ -112,7 +112,7 @@ def open_wiki():
text_area = tk.Text(wiki_window, wrap=tk.WORD) text_area = tk.Text(wiki_window, wrap=tk.WORD)
text_area.pack(expand=True, fill=tk.BOTH) text_area.pack(expand=True, fill=tk.BOTH)
filename = os.path.join("wiki", "wiki.md") filename = os.path.join("PfandApplication/wiki", "wiki.md")
try: try:
with open(filename, "r", encoding="utf-8") as file: with open(filename, "r", encoding="utf-8") as file: