-
Notifications
You must be signed in to change notification settings - Fork 308
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
Parse talker name error #39
Comments
You seem to be using an old version of this project. Could you update and try again? |
hi,Yuxin:
Yes, work with updated version of parse.py.
1. Got another error under dumping to html output:
./dump-html.py --db decrypted.db --avt avatar.index --res resource
"😘Brothers 🏘🏞😘" --output fourchat.html
[17:23:25 80@parser.py:wechat.parser] Your username is: wxid_abcd123456789
[17:23:25 54@parser.py:wechat.parser] Found xx names in `contact` table.
[17:23:25 44@msg.py:wechat.msg] Unhandled message type: 10002
[17:23:25 154@parser.py:wechat.parser] Unknown contact: 123456789@chatroom
...
[17:23:25 154@parser.py:wechat.parser] Unknown contact: 123456789@chatroom
[17:23:25 44@msg.py:wechat.msg] Unhandled message type: 318767153
[17:23:26 44@msg.py:wechat.msg] Unhandled message type: 268435505
[17:23:26 74@parser.py:wechat.parser] Found 22491 message records.
[17:23:26 86@parser.py:wechat.parser] Found 1158 hd image records.
Number of Messages: 18223
[17:23:26 54@render.py:wechat.msg] Loading jquery.fancybox.css
[17:23:26 54@render.py:wechat.msg] Loading wx.css
[17:23:26 63@render.py:wechat.msg] Loading jquery-latest.min.js
[17:23:26 63@render.py:wechat.msg] Loading main.js
[17:23:26 63@render.py:wechat.msg] Loading jquery.fancybox.js
[17:23:26 42@avatar.py:wechat.avatar] Avatar for wxid_abcd123456789 not
found in avatar database.
[17:23:26 64@avatar.py:wechat.avatar] Cannot read avatar from
resource/sfs/avatar.block.00000: [Errno 2] No such file or directory:
'resource/sfs/avatar.block.00000'
[17:23:26 64@avatar.py:wechat.avatar] Cannot read avatar from
resource/sfs/avatar.block.00000: [Errno 2] No such file or directory:
'resource/sfs/avatar.block.00000'
[17:23:26 64@avatar.py:wechat.avatar] Cannot read avatar from
resource/sfs/avatar.block.00000: [Errno 2] No such file or directory:
'resource/sfs/avatar.block.00000'
Traceback (most recent call last):
File "./dump-html.py", line 44, in <module>
htmls = render.render_msgs(msgs)
File "/home/myuser/Downloads/WechatBackup/wechat/render.py", line 193, in
render_msgs
self.prepare_avatar_css(talkers)
File "/home/myuser/Downloads/WechatBackup/wechat/render.py", line 180, in
prepare_avatar_css
avatar = self.res.get_contact_avatar(talker)
File "/home/myuser/Downloads/WechatBackup/wechat/res.py", line 126, in
get_contact_avatar
return self.get_avatar(self.parser.contacts_rev[nickname])
KeyError: u'wxid_abcd123456789'
I cannot find the resource/sfs/avatar.block.00000(might be something wrong
copy it from the phone), but hopefully the program might just "jump over"
the error.
2. As I could see, all users/chatrooms from ./list-chats.py decrypted.db
have ASCII-based wxid or chatroom number. It would be nice if there is an
option for ./dump-html.py with wxid/chatroom.
3. Some suggestions for improvement to README:
1) Addition libraries should be added:
sqlite libsqlite3-dev sqlcipher libsqlcipher-dev sox
In a Ubuntu terminal, install them by:
sudo apt-get install sqlite libsqlite3-dev sqlcipher libsqlcipher-dev sox
2) Enable adbd root permission with following app:
https://play.google.com/store/apps/details?id=eu.chainfire.adbd&hl=en
Once you install the app and run it, you need SU permission for this app.
Check "Enable insecure adbd" in this app.
Thanks for your good work!
|
|
I might have fixed the avatar issue. |
1. Thanks.
2. It should be internal id coded in ASCII. I got several chatrooms' name
with emojis, which is hard to copy and paste in the terminal. It would be
easier for me if there is an option with internal id other than display
name.
3. I am not sure sqlite etc. are required or not. However, I encouter
errors during installation or usage and solve them with those additional
packages.
|
|
With updated version, I can dump messages to html-files. Cheers! However, the list chats seems to have encoding problem? ./list-chats.py decrypted.db I am not program developer so I DO just as it shown in README:-) When it fails I try googling the error message(s). |
No you haven't updated everything to the latest version. The script |
OK, I fresh them to newest version and it works. Sorry for my mistake! |
It seems to be something is in the way for parse the talker:
./dump-msg.py decrypted.db OutDir/
[18:36:32 80@parser.py:wechat.parser] Your username is: wxid_xxxxxxxxxxxxxx
[18:36:32 54@parser.py:wechat.parser] Found XX contacts.
[18:36:32 43@msg.py:wechat.msg] Unhandled message type: xxxxxxx
[18:36:32 43@msg.py:wechat.msg] Unhandled message type: xxxx
Traceback (most recent call last):
File "./dump-msg.py", line 23, in
parser = WeChatDBParser(db_file)
File "/home/myuser/Downloads/WechatBackup/wechat/parser.py", line 39, in init
self._parse()
File "/home/myuser/Downloads/WechatBackup/wechat/parser.py", line 120, in _parse
self._parse_msg()
File "/home/myuser/Downloads/WechatBackup/wechat/parser.py", line 63, in _parse_msg
values = self._parse_msg_row(row)
File "/home/myuser/Downloads/WechatBackup/wechat/parser.py", line 151, in _parse_msg_row
logger.warn("Unknown contact, probably deleted: {}".format(tk_id))
UnboundLocalError: local variable 'tk_id' referenced before assignment
Why reading the database(decrypted.db), it seems to be OK(table 'message' converts to csv output):
index,msgId,msgSvrId,type,status,isSend,isShowTimer,createTime,talker,content,imgPath,reserved,lvbuffer,transContent,transBrandWording,talkerId,bizClientMsgId,bizChatId,bizChatUserId,msgSeq,flag
0,2,3.32903169404e+18,1,3.0,0.0,,1438259445000,weixin,歡迎你再次回到WeChat。如果你在使用過程中有任何的問題或建議,記得告訴我哦。,,,{,,,22,,,,,0
...
Any clue for finding the bug?
The text was updated successfully, but these errors were encountered: