-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexError: positional indexers are out-of-bounds #43
Comments
Hi, I've been having the exact same issue on different computers (both on Windows and Linux systems). |
weird, this should have been sorted. Could you provide me with a sample file? |
Hi! Of course, here's one: I do have one computer in which I can run asleep with no issues; but I haven't been able to get it to work anywhere else. |
Coming back with a weirder (if that´s even possible) update on this issue: Now, for more weirdness, I'm running asleep in my personal laptop at home... and it's running on both set of files with no errors. I'm trying to come up with theories about where this error is arising from, but I have no clue. |
Hey @LeandroCasiraghi thanks for getting in touch again. I suspect it might be due to your local python environment. If you verify that all of your systems have the same python version and dependencies, then it should work. By any chance if you are using any virtual environment to help you manage your dependencies, if you haven't. That might be a good thing to try. |
@angerhang thanks for the reply. Indeed, I'm working on virtual environments on all devices. |
I had the same exception and did some digging and found out day interval calculation had a bug, the first interval starts at noon of the previous day and ends at noon of the first day of wearing. However, if you started to wear after noon of the first day, there is no data in the first interval. after line 272:
it worked then. |
Thanks for the clarification. Indeed this is the expected behaviour. If you have the time to make a PR, happy to take a look :D |
Hi all, again. I updated the package to the latest version today on my personal and encountered this error on a file I had processed succesfully just yesterday. I'm trying to implement @BernieVA 's solution now, but I'm seeing that line 272 is not a clear position anymore, after the last update. Would you clarify where to modify the sleep_window.py file to make it work now? |
def get_day_intervals(start_date, end_date, date_format):
# 1. Get day intervals
day_intervals = []
day_end_str = "1990-01-01 09:47:50.439000"
my_day_end = pd.to_datetime(day_end_str, format=date_format)
if start_date.hour < 12:
my_day_start = start_date.replace(
hour=12, minute=0, second=0, microsecond=0)
my_day_start = my_day_start - timedelta(hours=24)
else:
my_day_start = start_date.replace(
hour=12, minute=0, second=0, microsecond=0)
From: LeandroCasiraghi ***@***.***>
Sent: Friday, July 12, 2024 5:25 PM
To: OxWearables/asleep ***@***.***>
Cc: Gan, Qiwei ***@***.***>; Mention ***@***.***>
Subject: [EXTERNAL] Re: [OxWearables/asleep] IndexError: positional indexers are out-of-bounds (Issue #43)
Hi all, again. I updated the package to the latest version today on my personal and encountered this error on a file I had processed succesfully just yesterday. I'm trying to implement @BernieVA<https://github.com/BernieVA> 's solution now, but I'm seeing that line 272 is not a clear position anymore, after the last update. Would you clarify where to modify the sleep_window.py file to make it work now?
Thanks!
-
Reply to this email directly, view it on GitHub<#43 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AYHT6XD4OMSPPT75Z3RO5DTZMBQWPAVCNFSM6AAAAAA6N2SZZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRWGUYTSNBZHA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
@LeandroCasiraghi and @BernieVA thanks for reporting. Indeed, a couple of our members have also reported the same error which seems to be strange. I suspect it might because some dependencies have changed to make new installation break. I will investigate this issue tomorrow and provide a patch |
Hey all, I believe the recent PR should have fixed this issue. You could test it out with the least release
If the issue still persists, please provide me with a sample file when reopening this issue. Thanks for all of your feedback again ;D @LeandroCasiraghi @BernieVA @aidanacquah |
I believe this is also a matter of better error handling.
This bug can be reproduced e.g. with the file "ukb/accelerometer/group5/3801805_90001_0_0.cwa.gz"
See attached file for the log.
index_error_log.txt
The text was updated successfully, but these errors were encountered: