try:
with open(str(os.path.dirname(os.path.abspath(__file__))).replace(__file__, "savedata.json")) as saveddata:
savedata = json.load(saveddata)
pass
# TODO: FIX THIS ERROR PLEASE
except FileNotFoundError:
functions.animated_print("Savedata was not found. If you already have a savedata.json file, copy-paste it here.")
time.sleep(10)
raise Exception("Program exited.")
# except PermissionError:
# functions.animated_print("potatoes yum")
PS C:\Stuff> py "c:\Stuff\Programming\Python\LCP Enhanced\script.py"
Starting inspection... The program will automatically close after 10 seconds if failed the inspection.
Python interpreter version requirement passed (Required: 3.10~, Current: 3.13.0)
Dependencies (functions.py) passed.
External libraries passed.
Traceback (most recent call last):
File "c:\Stuff\Programming\Python\LCP Enhanced\script.py", line 31, in <module>
with open(str(os.path.dirname(os.path.abspath(__file__))).replace(__file__, "savedata.json")) as saveddata:
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'c:\\Stuff\\Programming\\Python\\LCP Enhanced'
PS C:\Stuff>
What am I doing wrong here??