❯ python3 NASA_API.pyw
Traceback (most recent call last):
File "NASA_API.pyw", line 22, in <module>
with open(image_path, 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'E:/Theseus/Pictures/NASA_APOD/2022_03_06_NASA_APOD.png'
This is because most users will not have an E:/Theseus/Pictures/ path in their computers.
To solve this, I recommend you look into using an environment variable instead.
When running the program I'm getting this error:
This is because most users will not have an
E:/Theseus/Pictures/
path in their computers.To solve this, I recommend you look into using an environment variable instead.
Here is one resource: https://www.nylas.com/blog/making-use-of-environment-variables-in-python/