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

开始以后闪退 #23

Closed
0xbba opened this issue Aug 13, 2021 · 3 comments
Closed

开始以后闪退 #23

0xbba opened this issue Aug 13, 2021 · 3 comments

Comments

@0xbba
Copy link

0xbba commented Aug 13, 2021

看记录好像能识别出手牌,麻烦帮忙看看是为什么

F:\Desktop\DouZero_For_HappyDouDiZhu-2.0>python main.py
{'three_landlord_cards': [9, 8, 3], 'landlord_up': [17, 17, 14, 14, 13, 13, 12, 12, 10, 9, 8, 7, 7, 6, 5, 4, 3], 'landlord': [9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 14, 14, 17, 17, 20, 30], 'landlord_down': [3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8]}
Traceback (most recent call last):
File "C:\Users\liule\AppData\Local\Programs\Python\Python38\lib\site-packages\git_init_.py", line 83, in
refresh()
File "C:\Users\liule\AppData\Local\Programs\Python\Python38\lib\site-packages\git_init_.py", line 73, in refresh
if not Git.refresh(path=path):
File "C:\Users\liule\AppData\Local\Programs\Python\Python38\lib\site-packages\git\cmd.py", line 287, in refresh
raise ImportError(err)
ImportError: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception

Example:
export GIT_PYTHON_REFRESH=quiet

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 164, in init_cards
ai_players[1] = DeepAgent(self.user_position, self.card_play_model_path_dict[self.user_position])
File "F:\Desktop\DouZero_For_HappyDouDiZhu-2.0\douzero\evaluation\deep_agent.py", line 25, in init
self.model = load_model(position, model_path)
File "F:\Desktop\DouZero_For_HappyDouDiZhu-2.0\douzero\evaluation\deep_agent.py", line 7, in load_model
from douzero.dmc.models import model_dict
File "F:\Desktop\DouZero_For_HappyDouDiZhu-2.0\douzero\dmc_init
.py", line 1, in
from .dmc import train
File "F:\Desktop\DouZero_For_HappyDouDiZhu-2.0\douzero\dmc\dmc.py", line 12, in
from .file_writer import FileWriter
File "F:\Desktop\DouZero_For_HappyDouDiZhu-2.0\douzero\dmc\file_writer.py", line 25, in
import git
File "C:\Users\liule\AppData\Local\Programs\Python\Python38\lib\site-packages\git_init
.py", line 85, in
raise ImportError('Failed to initialize: {0}'.format(exc))
ImportError: Failed to initialize: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception

Example:
export GIT_PYTHON_REFRESH=quiet

@0xbba
Copy link
Author

0xbba commented Aug 13, 2021

pos_debug.py也运行不了

F:\Desktop\DouZero_For_HappyDouDiZhu-2.0>python pos_debug.py
Traceback (most recent call last):
File "pos_debug.py", line 25, in
cv2.imshow("test", img)
cv2.error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-q3d_8t8e\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

@tianqiraf
Copy link
Owner

@0xbba 克隆一下最新的代码,main.py第347行有os.environ["GIT_PYTHON_REFRESH"] = 'quiet'
pos_debug.py需要替换自己的截图路径

@0xbba
Copy link
Author

0xbba commented Aug 15, 2021

@0xbba 克隆一下最新的代码,main.py第347行有os.environ["GIT_PYTHON_REFRESH"] = 'quiet'
pos_debug.py需要替换自己的截图路径

已解决,感谢.我直接在Releases下载的,没想到不是最新的

@0xbba 0xbba closed this as completed Aug 15, 2021
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

2 participants