Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

版本与解码问题 #40

Open
rulke opened this issue Apr 27, 2023 · 2 comments
Open

版本与解码问题 #40

rulke opened this issue Apr 27, 2023 · 2 comments

Comments

@rulke
Copy link

rulke commented Apr 27, 2023

经使用刺激界面stim_demo.py发现,使用python3.10的环境会出现如下错误:
ImportError: cannot import name 'MutableMapping' from 'collections'
在3.10环境下lib下的collections的__init__.py文件里添加如下语句即可解决:
from collections.abc import Mapping
from collections.abc import MutableMapping
此时若出现以下json解码错误:
TypeError: JSONDecoder.init() got an unexpected keyword argument 'encoding'
可同样在3.10环境下lib下的json的__init__.py文件里的load函数处将如下语句更改:
def loads(s, *, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None,**kw):
更改为:
def loads(s, *, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, encoding='utf-8',**kw):
此时,再运行stim_demo.py 即可成功
希望可以帮助装好了环境又不想切换的小伙伴

@muziyue1118
Copy link

使用刺激界面stim_demo.py里面的wx包始终安装不成功有没有解决方法?

@ch-MEIJIE
Copy link
Collaborator

您可尝试使用conda先把wxpython包安装好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants