masek014 / aia_lightcurves

A small package created for generating and plotting AIA lightcurves.
MIT License
2 stars 0 forks source link

`aia_requests.build_aia_urls` struggles with querying short time intervals. #8

Closed masek014 closed 1 year ago

masek014 commented 1 year ago

Problem

Sometimes, aia_requests.parse_file_ids keys a NoneType object (resulting in an exception) when the time interval provided to build_aia_urls is relatively short (< 5 minutes). I do not know what is causing this, and I do not know why it only occurs for short time intervals. However, I have noticed that this issue is not consistent, meaning it's likely not a problem with the relevant functions in aia_requests and rather is an issue with the server being queried.

Solution

Since this is not a consistent problem, it can be mitigated by attempting the query again if it fails. It will eventually succeed by adding a while loop to attempt the query again when it fails.

Will commit a solution later today.

settwi commented 1 year ago

thanks reedOn May 4, 2023, at 09:25, Reed B. Masek @.***> wrote: Problem Sometimes, aia_requests.parse_file_ids keys a NoneType object (resulting in an exception) when the time interval provided to build_aia_urls is relatively short (< 5 minutes). I do not know what is causing this, and I do not know why it only occurs for short time intervals. However, I have noticed that this issue is not consistent, meaning it's likely not a problem with the relevant functions in aia_requests and rather is an issue with the server being queried. Solution Since this is not a consistent problem, it can be mitigated by attempting the query again if it fails. It will eventually succeed by adding a while loop to attempt the query again when it fails. Will commit a solution later today.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

masek014 commented 1 year ago

Stop checking your email - you're on vacation.

settwi commented 1 year ago

:(On May 4, 2023, at 09:43, Reed B. Masek @.***> wrote: Stop checking your email - you're on vacation.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

masek014 commented 1 year ago

Fixed with commit, although the implementation of the fix could maybe be improved.