mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-21 01:52:35 +08:00
修复NoneType object is not iterable的问题
This commit is contained in:
parent
e64af57ca3
commit
e1361a6b23
@ -40,7 +40,7 @@ class MicroMsg:
|
||||
|
||||
def get_contact(self):
|
||||
if not self.open_flag:
|
||||
return None
|
||||
return []
|
||||
try:
|
||||
lock.acquire(True)
|
||||
sql = '''SELECT UserName, Alias, Type, Remark, NickName, PYInitial, RemarkPYInitial, ContactHeadImgUrl.smallHeadImgUrl, ContactHeadImgUrl.bigHeadImgUrl,ExTraBuf,COALESCE(ContactLabel.LabelName, 'None') AS labelName
|
||||
|
@ -1,7 +1,9 @@
|
||||
import shutil
|
||||
|
||||
from PyQt5.QtCore import QThread, pyqtSignal
|
||||
from PyQt5.QtWidgets import QWidget, QMessageBox, QAction, QLineEdit
|
||||
|
||||
from app.DataBase import micro_msg_db, misc_db, msg_db
|
||||
from app.DataBase import micro_msg_db, misc_db, msg_db, close_db
|
||||
from app.components import ContactQListWidgetItem, ScrollBar
|
||||
from app.person import Contact
|
||||
from app.ui.Icon import Icon
|
||||
@ -136,6 +138,15 @@ class ShowContactThread(QThread):
|
||||
|
||||
def run(self) -> None:
|
||||
contact_info_lists = micro_msg_db.get_contact()
|
||||
if not contact_info_lists:
|
||||
self.load_finish_signal.emit(True)
|
||||
# QMessageBox.critical(None, "错误", "数据库错误,请重启电脑后重试")
|
||||
close_db()
|
||||
try:
|
||||
shutil.rmtree('./app/Database/Msg')
|
||||
except:
|
||||
pass
|
||||
return
|
||||
for contact_info_list in contact_info_lists:
|
||||
# UserName, Alias,Type,Remark,NickName,PYInitial,RemarkPYInitial,ContactHeadImgUrl.smallHeadImgUrl,ContactHeadImgUrl,bigHeadImgUrl
|
||||
contact_info = {
|
||||
|
@ -3,7 +3,7 @@ from typing import List
|
||||
from PyQt5.QtCore import QThread, pyqtSignal
|
||||
from PyQt5.QtWidgets import QWidget, QMessageBox, QAction, QLineEdit, QLabel
|
||||
|
||||
from app.DataBase import micro_msg_db, misc_db
|
||||
from app.DataBase import micro_msg_db, misc_db, close_db
|
||||
from app.components import ContactQListWidgetItem, ScrollBar
|
||||
from app.person import Contact
|
||||
from app.ui.Icon import Icon
|
||||
@ -152,6 +152,16 @@ class ShowContactThread(QThread):
|
||||
|
||||
def run(self) -> None:
|
||||
contact_info_lists = micro_msg_db.get_contact()
|
||||
if not contact_info_lists:
|
||||
self.load_finish_signal.emit(True)
|
||||
# QMessageBox.critical(None, "错误", "数据库错误,请重启电脑后重试")
|
||||
close_db()
|
||||
import shutil
|
||||
try:
|
||||
shutil.rmtree('./app/Database/Msg')
|
||||
except:
|
||||
pass
|
||||
return
|
||||
for contact_info_list in contact_info_lists:
|
||||
# UserName, Alias,Type,Remark,NickName,PYInitial,RemarkPYInitial,ContactHeadImgUrl.smallHeadImgUrl,ContactHeadImgUrl,bigHeadImgUrl,ExtraBuf
|
||||
detail = decodeExtraBuf(contact_info_list[9])
|
||||
|
@ -332,11 +332,14 @@ class MainWinController(QMainWindow, mainwindow.Ui_MainWindow, QCursorGif):
|
||||
try:
|
||||
img_bytes = misc_db.get_avatar_buffer(wxid)
|
||||
except:
|
||||
close_db()
|
||||
logger.error(f'数据库错误:\n{traceback.format_exc()}')
|
||||
QMessageBox.critical(self, "数据库错误", "请重启微信后重试")
|
||||
close_db()
|
||||
import shutil
|
||||
shutil.rmtree('./app/Database/Msg')
|
||||
try:
|
||||
shutil.rmtree('./app/Database/Msg')
|
||||
except:
|
||||
pass
|
||||
return
|
||||
if not img_bytes:
|
||||
return
|
||||
|
@ -1,16 +0,0 @@
|
||||
教程参考
|
||||
[导出聊天记录](https://blog.csdn.net/m0_59452630/article/details/124222235?spm=1001.2014.3001.5501 "一文教会你导出微信聊天记录")
|
||||
|
||||
对于模拟器中信息提取,如果使用自带的Amaze复制到共享文件夹出现错误,无法导入可以使用MT管理器
|
||||
|
||||

|
||||
|
||||
MT管理器打开界面如下图所示,右边打开微信文件存储位置,找到MicroMsg,左边打开共享文件位置,可以通过右边的电脑图案查看路径。
|
||||
|
||||
如图,长按MicroMsg文件夹,弹出弹窗,点击复制->确认。
|
||||
|
||||

|
||||
|
||||
开始复制,稍等一会即可完成复制。
|
||||
|
||||

|
Loading…
Reference in New Issue
Block a user