当前位置:网站首页>[stepping on the pit] MELD in win11 wsl2 cannot be used normally. Problem repair
[stepping on the pit] MELD in win11 wsl2 cannot be used normally. Problem repair
2022-04-23 06:39:00 【mightbxg】
Win11 Has been used by default in wslg To display WSL2 Medium GUI, No additional opening is required Xserver, This is really a very convenient and practical function , But at the moment, (2021.12) It doesn't seem particularly perfect yet . In the process of experience, I encountered a problem of egg pain :meld Exception occurred while comparing files .
meld Is an open source file for comparison / Folder tools , similar Beyond Compare. It can be set to git merge.tool, So as to solve git Conflict during merge . Before Win10+WSL2+Xserver Use... In the environment meld I haven't had any problems , But in Win11 But it will report a lot of mistakes :
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 34, in do_realize
self._handle1.realize(self)
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 270, in realize
attr.cursor = Gdk.Cursor.new_for_display(widget.get_display(),
TypeError: constructor returned NULL
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 46, in do_map
self._handle1.set_visible(True)
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 288, in set_visible
self._window.show()
AttributeError: 'NoneType' object has no attribute 'show'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 201, in do_size_allocate
self._handle1.set_visible(mapped and wlink1 > 0)
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 288, in set_visible
self._window.show()
AttributeError: 'NoneType' object has no attribute 'show'
...
I haven't found a solution to this problem on the internet yet , Looks like GTK The problem of , The closest post is :TypeError constructor returned NULL in wayland session. It happened that wslg Also used wayland, With a try mentality , I opened the /usr/lib/python3/dist-packages/meld/diffgrid.py
, Place the third of them 270 Change line to :
#attr.cursor = Gdk.Cursor.new_for_display(widget.get_display(),
# Gdk.CursorType.
# SB_H_DOUBLE_ARROW)
attr.cursor = Gdk.Cursor.new_from_name(widget.get_display(), "col-resize")
The test again , Everything is all right ~~
版权声明
本文为[mightbxg]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230546583251.html
边栏推荐
猜你喜欢
基于SSD的物体检测案例实现
【UDS统一诊断服务】五、诊断应用示例:Flash Bootloader
【UDS统一诊断服务】(补充)五、ECU bootloader开发要点详解 (1)
Vscode custom comments
Introduction to nonparametric camera distortion model
[ThreadX] ThreadX source code reading plan (I)
C语言的浪漫
C语言实用小技巧合集(持续更新)
For() loop parameter call order
【UDS统一诊断服务】一、诊断概述(3)— ISO 15765体系结构
随机推荐
Tabbar implementation of dynamic bottom navigation bar in uniapp, authority management
Wechat applet request encapsulation
用C语言实现重写strcmp等四个函数
Uniapp encapsulates request
C语言实现2048小游戏方向合并逻辑
【UDS统一诊断服务】五、诊断应用示例:Flash Bootloader
TP download folder, compress folder and download
A solution to replace not in in SQL
Dynamic creation and release, assignment and replication of objects
静态成员
代理服务器
基于SSD的物体检测案例实现
[untitled]
C语言输入和输出(printf和scanf函数、putchar和getchar函数)
Common shortcut keys of IDE
C语言实用小技巧合集(持续更新)
CUDA环境安装
在visual stdio中运行qt程序
PHP junior programmers, take orders and earn extra money
猜數字遊戲