Open mhsshark opened 2 years ago
Are you able to print out these two variables, APPLE_TIME and content[3] in line 65 of extract_iphone.py?
Are you able to print out these two variables, APPLE_TIME and content[3] in line 65 of extract_iphone.py?
Generally I have no experience with python, however I'm sure I will be able to do it if you guide me
while content is not None:
if content[0] not in data:
data[content[0]] = {"name": None, "messages": {}}
print(f"{APPLE_TIME=}, {content[3]=}")
ts = APPLE_TIME + content[3]
APPLE_TIME=123456789, content[3]=987
See the below results:
APPLE_TIME=978296400.0, content[3]=633263721
APPLE_TIME=978296400.0, content[3]=-978307423.877771
Traceback (most recent call last):
File "C:\Users\[user]\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\[user]\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\[user]\AppData\Local\Programs\Python\Python39\Scripts\wtsexporter.exe\__main__.py", line 7, in <module>
File "C:\Users\[user]\AppData\Local\Programs\Python\Python39\lib\site-packages\Whatsapp_Chat_Exporter\__main__.py", line 174, in main
messages(db, data)
File "C:\Users\[user]\AppData\Local\Programs\Python\Python39\lib\site-packages\Whatsapp_Chat_Exporter\extract_iphone.py", line 70, in messages
"time": datetime.fromtimestamp(ts).strftime("%H:%M"),
OSError: [Errno 22] Invalid
I can see the content[3] = negative value for whatever reason.. let me know if I need to do something else to help
First, we need to determine which message the timestamp belongs to by looking at the WhatsApp database extracted. Then, identify the human-readable time of the message through the WhatsApp app. Doing so may allow us to understand why negative value is presented.
I'm`` having the same error i did a print(content) :
`APPLE_TIME=978303600.0, content[3]=-980367545.6843619
('3XXredactedXXX431@s.whatsapp.net', 84232, 0, -980367545.6843619, None, 10, None) Gathering messages...(35999/35999) `
I did a dirty fix/hack :(
if (content[3] < 0):
print(f"{APPLE_TIME=}, {content[3]=}")
print(content)
ts = APPLE_TIME
else:
ts = APPLE_TIME + content[3]
I like to put this chat into an android backup to restore it on an android phone but I guess is not possible
I'm`` having the same error i did a print(content) :
`APPLE_TIME=978303600.0, content[3]=-980367545.6843619
('3XXredactedXXX431@s.whatsapp.net', 84232, 0, -980367545.6843619, None, 10, None) Gathering messages...(35999/35999) `
I did a dirty fix/hack :(
if (content[3] < 0): print(f"{APPLE_TIME=}, {content[3]=}") print(content) ts = APPLE_TIME else: ts = APPLE_TIME + content[3]
I like to put this chat into an android backup to restore it on an android phone but I guess is not possible
When is your iPhone backup be created?
I did the backup the same day I posted the message, if you want me to try some things, I still have the backup and can do any change you want me to do
We will need the human-readable time and its corresponding raw timestamp to understand how should we interpret the timestamp. You may do so by following these steps:
dev
branch.time=ts,
with time=str(content["ZMESSAGEDATE"]),
if (content["ZMESSAGEDATE"] < 0):
ts = APPLE_TIME
else:
ts = APPLE_TIME + content["ZMESSAGEDATE"] # keep your hack here for now
message = Message(
from_me=content["ZISFROMME"],
timestamp=ts,
time=str(content["ZMESSAGEDATE"]),
key_id=content["ZSTANZAID"][:17],
)
well, I have a problem with that, I can't open whatsapp on the device, so I can't check the "Human-readable" time of the message.
I'll try to report more info from the messages that fail to see if that helps (I think are only 2 entries of the 35999)
If someone has the same problem, feel free to reproduce the steps I mentioned and report back. Meanwhile, any thoughts on the negative timestamp are welcome.
I did look for the two messages that have the negative input in the exported html logs.
My guess is that those are deleted messages, but as I can't see the whatsapp app is only a guess, find enclosed the pictures (the messages are inserted in the what looks like the right position but with the 2001-01-01 date)
I did look for the two messages that have the negative input in the exported html logs.
My guess is that those are deleted messages, but as I can't see the whatsapp app is only a guess, find enclosed the pictures (the messages are inserted in the what looks like the right position but with the 2001-01-01 date)
@kabutor Can you try to rerun the tool with the dev
branch? Any deleted messages should now be shown as "deleted message" correctly instead of displaying "This message is not supported". Doing so we can be sure if it is related to deleted message.
I'm sorry I don't have those files anymore.
A woman came to me, their husband and daughter has passed away in a car accident, I just help her to retrieve the whatsapps between her and her deceased relatives in a broken phone, as she find comfort on reading the conversations she had with them when they were alive, and your script was very helpful.
I thought you may find interesting that the software you created helped someone in a deep way. Thanks
I'm sorry I don't have those files anymore.
A woman came to me, their husband and daughter has passed away in a car accident, I just help her to retrieve the whatsapps between her and her deceased relatives in a broken phone, as she find comfort on reading the conversations she had with them when they were alive, and your script was very helpful.
I thought you may find interesting that the software you created helped someone in a deep way. Thanks
Sorry to hear that. Indeed, I'm grateful that the exporter was able to provide some comfort and support to someone in archiving the WhatsApp conversations.
I have the below error while extracting data for an iPhone backup:
To make it clear, some media files were extracted already.