Was able to get this to run for anyone who is interested. You have to edit two of the python files that are part of this plugin.
First, in crashloglabeler.py, change the PyQt5 on line 5 to PyQt6
All the rest of the changes are in crashlogviewer.py:
on lines 4,5, and 6 change the PyQt5 text to PyQt6.
change line 67 to: proxy_model.sort(0, Qt.SortOrder.DescendingOrder)
I deleted line 76, the list.setSelectionMode method. Couldn't find the Qt6 equivalent and I don't think it's absolutely necessary
since we removed a line, the following line numbers may be off, but just look above or below my line number
line 104, change the text to list.setContextMenuPolicy(Qt.ContextMenuPolicy.ActionsContextMenu)
line 108, change the text to button_box.setOrientation(Qt.Orientation.Horizontal)
line 109, change the text to button_box.setStandardButtons(QDialogButtonBox.StandardButton.Close)
line 111, change the text to button_box.button(QDialogButtonBox.StandardButton.Close).setAutoDefault(False)
and that should be it. just save those two files with the changes and things should run fine. i was able to use the plugin as normal after this. hope this helps someone.
I'm not sure if it has to do with the new version of MO2, or what the cause is, exactly; but I tried your fix, and my MO2 won't open. Removing the plugin allows it to open, at least; but I followed your instructions to the letter (literally copy/pasted line for line), to no avail.
works perfectly! thanks, and yes, each line is off by one after the deleted line. i commented it out instead of deleting it. use lines 105,109,110, 112.
Running v2.5.0 of MO2. Getting several errors about py modules not existing after installing this mod. Will give this fix a try. Thanks, Cardician77...
This is not working for me. Just updated to MO2 v2.5.0, edited these lines, but nope. Error says it can't find the plugins. Also used Zazzar's scripts, but the error persists. Not sure what happened but it's completely borked for me, used both the latest and the pre-release.
Hi, I had the same problem (errors at the start of MO2 even so I had modified files) but after a while I realised that I put this mod in the wrong place... Files like crashloglabeler.py crashlogviewer.py, __init_, lib folder etc... it should all be in the MO2/Plugins/crashlogtools folder, but I for some reason thought that it should be MO2/Plugins directly.... When I put everything in right folder (and used zip from GitHub) everything worked~ Maybe there's other not-s-smart people like me and it will be helpfull.
Sadly it didn't do anything. Now I'm getting a new error message: Plugin "Crash Log Viewer" failed: AttributeError: 'CrashLogViewer' object has no attribute 'dialog' At: (...) crashlogviewer.py(51): display
Indeed. We would need a version that works with PyQt6 .. may also need to use as newer version of python (so may need soem code changes for that). I also filed a bug report for this issue.
Does this work with linux? I'm on steam deck and get [error.cpp:24] OSError: [WinError 193] Bad EXE format for %1: 'C:/users/USERNAME/Documents/My Games/Skyrim Special Edition/SKSE/crashlog whenever attempting to open any crashlog
I had the same problem and managed to make a crude workaround by modifying crashlogviewer.py. Instead of trying to open the list item, you can add a text window and write this file's contents to the text window. Here is how i have done it: # In CrashLogViewer class, create an empty text editor widget and set it read-only text_display = QTextEdit() text_display.setReadOnly(True)
def open(index : "QModelIndex") -> None: source_index = proxy_model.mapToSource(index) # delete os.open # read the file contents and set the content display text to the acquired string selected_file = QFile(source_model.filePath(source_index)) selected_file.open(QFile.ReadOnly | QFile.Text) content_string = QTextStream(selected_file).readAll() selected_file.close() text_display.setPlainText(content_string)
the format of this is bad. where exactly do the indents go?
class CrashLogViewer(IPluginTool): # In CrashLogViewer class, create an empty text editor widget and set it read-only text_display = QTextEdit() text_display.setReadOnly(True) def open(index : "QModelIndex") -> None: source_index = proxy_model.mapToSource(index) # delete os.open # read the file contents and set the content display text to the acquired string selected_file = QFile(source_model.filePath(source_index)) selected_file.open(QFile.ReadOnly | QFile.Text) content_string = QTextStream(selected_file).readAll() selected_file.close() text_display.setPlainText(content_string) layout.addWidget(text_display) def __init__(self): super().__init__()
So what do you do if your path is Mod Organizer 2\plugins\crashlogtools
But despite this the plugin doesn't actually show up? Did I perhaps do something wrong? MO2 doesn't even acknowledge that it exists. I'm using MO2 v2.2.2.1 for reference.
``` File "C:/Modding/MO2/plugins\crashlogtools\crashloglabeler.py", line 79, in onUserInterfaceInitializedCallback self.processor.process_log(log) File "C:/Modding/MO2/plugins\crashlogtools\crashlogutil.py", line 41, in process_log crash_log = CrashLog(log) File "C:/Modding/MO2/plugins\crashlogtools\crashlogutil.py", line 98, in __init__ self.read_file(path) File "C:/Modding/MO2/plugins\crashlogtools\crashlogutil.py", line 143, in read_file line = f.readline() UnicodeDecodeError: 'cp932' codec can't decode byte 0x8b in position 354: illegal multibyte sequence ```
75 comments
First, in crashloglabeler.py, change the PyQt5 on line 5 to PyQt6
All the rest of the changes are in crashlogviewer.py:
on lines 4,5, and 6 change the PyQt5 text to PyQt6.
and that should be it. just save those two files with the changes and things should run fine. i was able to use the plugin as normal after this. hope this helps someone.
Edit: I'm dumb, don't be like me. it works fine.
use lines 105,109,110, 112.
In case of lazy peepz passing by, here the updated scripts :
crashlogtools
😁
"list.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection)"
Not sure if it matters much, tho. I think it enables multi-selection in the GUI.
Maybe there's other not-s-smart people like me and it will be helpfull.
At: (...) crashlogviewer.py(51): display
MO2 error log:
---------------------------
Error
---------------------------
an error occurred: KeyError: b'HEAD'
At:
M:\Mod Organizer 2-5\plugins\crashlogtools\lib\dulwich\refs.py(324): __getitem__
M:\Mod Organizer 2-5\plugins\crashlogtools\lib\dulwich\porcelain.py(1142): pull
M:\Mod Organizer 2-5/plugins\crashlogtools\crashlogutil.py(34): update_database
M:\Mod Organizer 2-5/plugins\crashlogtools\crashloglabeler.py(75): onUserInterfaceInitializedCallback
---------------------------
OK
---------------------------
---------------------------
Error
---------------------------
Plugin "Crash Log Viewer" failed: AttributeError: 'CrashLogViewer' object has no attribute 'dialog'
At:
M:\Mod Organizer 2-5/plugins\crashlogtools\crashlogviewer.py(51): display
---------------------------
OK
---------------------------
I click on Tools > Tool Plugins > Crash Log Viewer and a tiny blank window pops up with no crashlogs.
EDIT: in some other responses I found how to change it so it sees *.log .... however, it still doesn't open the log files into that GUI
in crashlogs.py
line 27,28,29: in the "FINDERS" section should read (may need to change the VR as well if you use it)
"Skyrim Special Edition": CrashLogFinder(
os.path.join(MY_DOCUMENTS, "My Games", "Skyrim Special Edition", "SKSE", "Crashlogs"),
"*.log"
# In CrashLogViewer class, create an empty text editor widget and set it read-only
text_display = QTextEdit()
text_display.setReadOnly(True)
def open(index : "QModelIndex") -> None:
source_index = proxy_model.mapToSource(index)
# delete os.open
# read the file contents and set the content display text to the acquired string
selected_file = QFile(source_model.filePath(source_index))
selected_file.open(QFile.ReadOnly | QFile.Text)
content_string = QTextStream(selected_file).readAll()
selected_file.close()
text_display.setPlainText(content_string)
layout.addWidget(text_display)
class CrashLogViewer(IPluginTool):
# In CrashLogViewer class, create an empty text editor widget and set it read-only
text_display = QTextEdit()
text_display.setReadOnly(True)
def open(index : "QModelIndex") -> None:
source_index = proxy_model.mapToSource(index)
# delete os.open
# read the file contents and set the content display text to the acquired string
selected_file = QFile(source_model.filePath(source_index))
selected_file.open(QFile.ReadOnly | QFile.Text)
content_string = QTextStream(selected_file).readAll()
selected_file.close()
text_display.setPlainText(content_string)
layout.addWidget(text_display)
def __init__(self):
super().__init__()
Mod Organizer 2\plugins\crashlogtools
But despite this the plugin doesn't actually show up? Did I perhaps do something wrong? MO2 doesn't even acknowledge that it exists. I'm using MO2 v2.2.2.1 for reference.
Also make sure you restart MO2 after installing this
```
File "C:/Modding/MO2/plugins\crashlogtools\crashloglabeler.py", line 79, in onUserInterfaceInitializedCallback
self.processor.process_log(log)
File "C:/Modding/MO2/plugins\crashlogtools\crashlogutil.py", line 41, in process_log
crash_log = CrashLog(log)
File "C:/Modding/MO2/plugins\crashlogtools\crashlogutil.py", line 98, in __init__
self.read_file(path)
File "C:/Modding/MO2/plugins\crashlogtools\crashlogutil.py", line 143, in read_file
line = f.readline()
UnicodeDecodeError: 'cp932' codec can't decode byte 0x8b in position 354: illegal multibyte sequence
```
what should i do next?
failed to initialize plugin D:/Mods/MO/plugins/crashlogtools: ImportError: DLL load failed while importing QtCore: The specified module could not be found.
At:
D:\Mods/MO/plugins\crashlogtools\crashloglabeler.py(5): <module>
<frozen importlib._bootstrap>(241): _call_with_frames_removed
<frozen
importlib._bootstrap_external>(940): exec_module
<frozen importlib._bootstrap>(705): _load_unlocked
<frozen importlib._bootstrap> (1150): _find_and_load_unlocked <frozen importlib._bootstrap>(1176): _find_and_load D:\Mods/MO/plugins\crashlogtools\__init__.py(8): <module> <frozen importlib._bootstrap>(241): _call_with_frames_removed <frozen importlib._bootstrap_external> (940): exec_module <frozen importlib._bootstrap>(705): _load_unlocked
<frozen importlib._bootstrap> (1149): _find_and_load_unlocked <frozen importlib._bootstrap>(1176): _find_and_load