shadowsocksrr / electron-ssr

Shadowsocksr client using electron
MIT License
1.73k stars 508 forks source link

[bug]arch-Python3.10.4-AttributeError #125

Open Katzeee opened 2 years ago

Katzeee commented 2 years ago
2022-05-13 14:25:12:264 [info] run command: %s python /home/xac/.config/electron-ssr/shadowsocksr/shadowsocks/local.py -s shallaz4.dnsflix.com -p 566 -k ****** -m chacha20-ietf -O auth_aes128_md5 -G 7515:-2Wt64CqdUoX]3 -o plain -b 127.0.0.1 -l 1080
2022-05-13 14:25:12:292 [info] Traceback (most recent call last):
2022-05-13 14:25:12:292 [info]   File "/home/xac/.config/electron-ssr/shadowsocksr/shadowsocks/local.py", line 31, in <module>
2022-05-13 14:25:12:292 [info]     from shadowsocks import shell, daemon, eventloop, tcprelay, udprelay, asyncdns
2022-05-13 14:25:12:292 [info]   File "/home/xac/.config/electron-ssr/shadowsocksr/shadowsocks/../shadowsocks/shell.py", line 26, in <module>
2022-05-13 14:25:12:292 [info]     from shadowsocks.common import to_bytes, to_str, IPNetwork, PortRange
2022-05-13 14:25:12:293 [info]   File "/home/xac/.config/electron-ssr/shadowsocksr/shadowsocks/../shadowsocks/common.py", line 27, in <module>
2022-05-13 14:25:12:293 [info]     from shadowsocks import lru_cache
2022-05-13 14:25:12:293 [info]   File "/home/xac/.config/electron-ssr/shadowsocksr/shadowsocks/../shadowsocks/lru_cache.py", line 44, in <module>
2022-05-13 14:25:12:293 [info]     class LRUCache(collections.MutableMapping):
2022-05-13 14:25:12:293 [info] AttributeError: module 'collections' has no attribute 'MutableMapping'
2022-05-13 14:25:12:293 [info] 
2022-05-13 14:25:12:296 [error] Python SSR quit with code: 1

Solution: vim ~/.config/electron-ssr/shadowsocksr/shadowsocks/lru_cache.py change class LRUCache(collections.MutableMapping): to class LRUCache(collections.abc.MutableMapping): in line 44

shaoyingrui commented 1 month ago


Thank u for your solution