From 65d8b4a699540fc47e61fbf3a4ac5b6dafccf424 Mon Sep 17 00:00:00 2001 From: joseph Date: Sat, 9 Dec 2023 21:29:59 +0100 Subject: [PATCH] fix some broken stuff --- create_calendar.py | 10 +++++----- main.py | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/create_calendar.py b/create_calendar.py index d69a572..cd95a9f 100644 --- a/create_calendar.py +++ b/create_calendar.py @@ -5,10 +5,10 @@ from pathlib import Path -pd_eleves = pandas.read_csv('eleves.csv') +pd_eleves = pandas.read_csv('Resources/eleves.csv') np_eleves = pd_eleves.to_numpy() -pd_colles = pandas.read_csv('colles.csv') +pd_colles = pandas.read_csv('Resources/colles.csv') np_colles = pd_colles.to_numpy() @@ -131,7 +131,7 @@ def get_langues(langues): list[icalendar.Event] """ liste_langues = [] - p = Path(__file__).with_name('Calendars') + p = Path(__file__).with_name('Resources') p = Path(p, f"EDT_Langues.ics") with p.open('r') as f: opened_cal = icalendar.Calendar.from_ical(f.read()) @@ -154,7 +154,7 @@ def get_calendar(groupe, langues): break new_cal = icalendar.Calendar() - p = Path(__file__).with_name('Calendars') + p = Path(__file__).with_name('Resources') p = Path(p, f"EDT_{moitie}.ics") with p.open('r') as f: @@ -163,7 +163,7 @@ def get_calendar(groupe, langues): for event in opened_cal.walk("vevent"): new_cal.add_component(event) - p = Path(__file__).with_name('Calendars') + p = Path(__file__).with_name('Resources') p = Path(p, f"EDT_Base.ics") with p.open('r') as f: diff --git a/main.py b/main.py index 0b6c2d3..ac1b7d3 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,6 @@ from typing import Optional, List -from io import BytesIO, getenv +from io import BytesIO +from os import getenv import discord from discord import app_commands