SwimmingLiu / YOLOSHOW

YOLO SHOW - YOLOv10 / YOLOv9 / YOLOv8 / YOLOv7 / YOLOv5 / RTDETR GUI based on Pyside6
https://swimmingliu.cn/posts/diary/yoloshow
GNU Affero General Public License v3.0
291 stars 29 forks source link

Error #1

Closed xinsuinizhuan closed 8 months ago

xinsuinizhuan commented 8 months ago

(yolov8) G:\Item_doing\newest_attention\YOLOSHOW-master>python main.py

📢 Tips: QFluentWidgets Pro is now released. Click https://qfluentwidgets.com/pages/pro to learn more about it.

Traceback (most recent call last): File "C:\Users\lllstandout.conda\envs\yolov8\lib\tokenize.py", line 330, in find_cookie line_string = line.decode('utf-8') UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "G:\Item_doing\newest_attention\YOLOSHOW-master\main.py", line 3, in from YOLOSHOW import File "G:\Item_doing\newest_attention\YOLOSHOW-master\YOLOSHOW.py", line 24, in from models import common, yolo File "G:\Item_doing\newest_attention\YOLOSHOW-master\models\common.py", line 17, in from yolocode.yolov7.utils.plots import color_list, plot_one_box File "G:\Item_doing\newest_attention\YOLOSHOW-master\yolocode\yolov7\utils\plots.py", line 15, in import seaborn as sns File "C:\Users\lllstandout.conda\envs\yolov8\lib\site-packages\seaborn__init__.py", line 2, in from .rcmod import # noqa: F401,F403 File "C:\Users\lllstandout.conda\envs\yolov8\lib\site-packages\seaborn\rcmod.py", line 5, in from . import palettes File "C:\Users\lllstandout.conda\envs\yolov8\lib\site-packages\seaborn\palettes.py", line 9, in from .utils import desaturate, get_color_cycle File "C:\Users\lllstandout.conda\envs\yolov8\lib\site-packages\seaborn\utils.py", line 18, in from .external.appdirs import user_cache_dir File "C:\Users\lllstandout.conda\envs\yolov8\lib\site-packages\seaborn\external\appdirs.py", line 234, in import win32com.shell File "C:\Users\lllstandout.conda\envs\yolov8\lib\site-packages\win32com__init__.py", line 6, in import pythoncom File "C:\Users\lllstandout.conda\envs\yolov8\lib\site-packages\pythoncom.py", line 2, in import pywintypes File "shibokensupport/signature/loader.py", line 61, in feature_imported File "shibokensupport/feature.py", line 137, in feature_imported File "shibokensupport/feature.py", line 148, in _mod_uses_pyside File "C:\Users\lllstandout.conda\envs\yolov8\lib\inspect.py", line 1024, in getsource lines, lnum = getsourcelines(object) File "C:\Users\lllstandout.conda\envs\yolov8\lib\inspect.py", line 1006, in getsourcelines lines, lnum = findsource(object) File "C:\Users\lllstandout.conda\envs\yolov8\lib\inspect.py", line 831, in findsource lines = linecache.getlines(file, module.dict) File "C:\Users\lllstandout.conda\envs\yolov8\lib\linecache.py", line 46, in getlines return updatecache(filename, module_globals) File "C:\Users\lllstandout.conda\envs\yolov8\lib\linecache.py", line 136, in updatecache with tokenize.open(fullname) as fp: File "C:\Users\lllstandout.conda\envs\yolov8\lib\tokenize.py", line 394, in open encoding, lines = detect_encoding(buffer.readline) File "C:\Users\lllstandout.conda\envs\yolov8\lib\tokenize.py", line 371, in detect_encoding encoding = find_cookie(first) File "C:\Users\lllstandout.conda\envs\yolov8\lib\tokenize.py", line 335, in find_cookie raise SyntaxError(msg) SyntaxError: invalid or missing encoding declaration for 'C:\Users\lllstandout\.conda\envs\yolov8\lib\site-packages\win32\pywintypes39.dll'

SwimmingLiu commented 8 months ago

Try to create a new virtual environment 创建一个新的环境试试?

bio-oid commented 8 months ago
Snipaste_2024-02-20_15-47-31

me too

SwimmingLiu commented 8 months ago

Alright I will check it

xinsuinizhuan commented 8 months ago

怎么样,重现没?

SwimmingLiu commented 8 months ago

排查了一下好像是因为Pyside6版本问题,更新到最新版应该就好了 pip install -U Pyside6

bio-oid commented 8 months ago
2

报错有变化,但这个utf-8的报错还是在。而且好几行报错都在python环境的lib文件夹下

bio-oid commented 8 months ago

排查了一下好像是因为Pyside6版本问题,更新到最新版应该就好了 pip install -U Pyside6

对,是因为这个。 image 虽然有这个报错,但是ui成功运行了

SwimmingLiu commented 8 months ago

排查了一下好像是因为Pyside6版本问题,更新到最新版应该就好了 pip install -U Pyside6

对,是因为这个。 image 虽然有这个报错,但是ui成功运行了 这个问题不大,报错是说pyside6-fluent-widgets配备的Pyside6版本比较老,最新版Pyside6和这个包不匹配而已。

Lhh-YB commented 7 months ago

Image

这种有遇见的吗?

SwimmingLiu commented 7 months ago

先尝试第一种方法,不行就第二种

  1. 重启Pycharm和Conda环境
  2. 删掉conda虚拟环境,新建一个重新安装
Lhh-YB commented 7 months ago

试过了没用, 39B75058 在终端运行可以。pycharm就出现,环境一样。 我无GPU,两个bug。第一:需要指定用CPU;第二IMG_FORMATS 和 VID_FORMATS要改为list形式,不然会报错TypeError: unsupported operand type(s) for +: 'set' and 'set'。

SwimmingLiu commented 7 months ago

第一,从github最新的代码可以解决IMG_FORMATS 和 VID_FORMATS的报错 第二, 终端能够运行,Pycharm不能运行。大概率是Pycharm没有配置好conda环境,解决办法是搜索“Pycharm如何配置Conda环境”

oiogan commented 1 month ago

Traceback (most recent call last): File "D:\yoloshow\YOLOSHOW-master\main.py", line 24, in yoloshow = yoloshowWindow() File "D:\yoloshow\YOLOSHOW-master\yoloshow\Window.py", line 17, in init super(YOLOSHOWWindow, self).init() File "D:\yoloshow\YOLOSHOW-master\yoloshow\YOLOSHOW.py", line 52, in init self.ui.setupUi(self) File "D:\yoloshow\YOLOSHOW-master\ui\YOLOSHOWUI.py", line 1340, in setupUi self.model_box = ComboBox(self.Model_QF_2) File "C:\anaconda3\envs\yolov10\lib\site-packages\qfluentwidgets\components\widgets\combo_box.py", line 372, in init super().init(parent=parent) File "C:\anaconda3\envs\yolov10\lib\site-packages\qfluentwidgets\components\widgets\combo_box.py", line 61, in init super().init(parent=parent) TypeError: arguments did not match any overloaded call: QPushButton(parent: Optional[QWidget] = None): argument 'parent' has unexpected type 'PySide6.QtWidgets.QWidget' QPushButton(text: Optional[str], parent: Optional[QWidget] = None): not enough arguments QPushButton(icon: QIcon, text: Optional[str], parent: Optional[QWidget] = None): not enough arguments 请问这个怎么解决啊?🥲

SwimmingLiu commented 1 month ago

Traceback (most recent call last): File "D:\yoloshow\YOLOSHOW-master\main.py", line 24, in yoloshow = yoloshowWindow() File "D:\yoloshow\YOLOSHOW-master\yoloshow\Window.py", line 17, in init super(YOLOSHOWWindow, self).init() File "D:\yoloshow\YOLOSHOW-master\yoloshow\YOLOSHOW.py", line 52, in init self.ui.setupUi(self) File "D:\yoloshow\YOLOSHOW-master\ui\YOLOSHOWUI.py", line 1340, in setupUi self.model_box = ComboBox(self.Model_QF_2) File "C:\anaconda3\envs\yolov10\lib\site-packages\qfluentwidgets\components\widgets\combo_box.py", line 372, in init super().init(parent=parent) File "C:\anaconda3\envs\yolov10\lib\site-packages\qfluentwidgets\components\widgets\combo_box.py", line 61, in init super().init(parent=parent) TypeError: arguments did not match any overloaded call: QPushButton(parent: Optional[QWidget] = None): argument 'parent' has unexpected type 'PySide6.QtWidgets.QWidget' QPushButton(text: Optional[str], parent: Optional[QWidget] = None): not enough arguments QPushButton(icon: QIcon, text: Optional[str], parent: Optional[QWidget] = None): not enough arguments 请问这个怎么解决啊?🥲


pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install "PySide6-Fluent-Widgets[full]" -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -U Pyside6 -i https://pypi.tuna.tsinghua.edu.cn/simple