当前位置:网站首页>[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
边栏推荐
猜你喜欢
Robocode教程5——Enemy类
Dynamic creation and release, assignment and replication of objects
【UDS统一诊断服务】四、诊断典型服务(5)— 功能/元件测试功能单元(例行程序功能单元0x31)
[UDS unified diagnosis service] i. diagnosis overview (3) - ISO 15765 architecture
基于SSD的物体检测案例实现
安装pyshp库
Class inheritance and derivation
clion安装教程
基于VGG卷积神经网络的图像识别代码实现
File viewing commands and user management commands
随机推荐
【OpenCV】使用 FileStorage 读写 Eigen 向量
相机标定:关键点法 vs 直接法
猜數字遊戲
Rust 中的指针:Box、Rc、Cell、RefCell
Robocode教程5——Enemy类
jenkspy包安装
C语言输入和输出(printf和scanf函数、putchar和getchar函数)
[UDS unified diagnostic service] IV. typical diagnostic service (2) - data transmission function unit
ArcGIS license错误-15解决方法
在visual stdio中运行qt程序
安装pyshp库
For() loop parameter call order
for()循环参数调用顺序
四元数乘法
Rust:在线程池中共享变量
Tabbar implementation of dynamic bottom navigation bar in uniapp, authority management
The waterfall waterfall flow of uview realizes single column and loads more
如何读文献
【UDS统一诊断服务】一、诊断概述(4)— 基本概念和术语
生成验证码