#5188 MLU调试环境内执行c2net库的prepare方法报错

Closed
created 2 months ago by wangj · 3 comments
wangj commented 2 months ago
新建MLU调试任务,进入容器执行c2net库的prepare()方法会报错: TypeError: __init__() got an unexpected keyword argument 'capture_output'
wangj added this to the V20240116 milestone 2 months ago
wangj added the
bug
label 2 months ago
liuzx was assigned by wangj 2 months ago
wangj added the
wait
label 2 months ago
wangj commented 2 months ago
Owner
经 @liuzx 定位,MLU调试环境的python版本3.6.12过低,需要升级到python3.7以上。
liuzx added the
test
label 1 month ago
liuzx commented 1 month ago
Collaborator
在python3.6中,获取时区报错了,这个capture_output参数必须是3.7才可以,用以下方式获取可以规避: def get_current_time(): current_time = datetime.datetime.now() result = subprocess.run(['date', '+%Z'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) timezone = result.stdout.strip() current_time_str = current_time.strftime("%Y-%m-%d %H:%M:%S") + f" {timezone}" return current_time_str
wangj removed the
wait
label 1 month ago
wangj commented 1 month ago
Owner
最新效果:MLU调试环境内python版本3.6.12,执行c2net库的prepare()方法不再报错了,会准备好数据。
wangj closed this issue 1 month ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.