This error message is indicating that there is an issue with the "screenshot" function in the Python script. Specifically, the error is caused by the "os.popen" command, which is trying to execute the "display settings" command and then split the returned string into two variables ("width" and "height"). However, the returned string does not contain the expected two values, which causes the "ValueError: not enough values to unpack" error to occur.

To fix this issue, you may need to adjust the "display settings" command or modify the code to handle cases where the command returns unexpected results. You could also consider using a different method to capture the screen, such as the "pyautogui" library, which provides a simpler and more reliable way to take screenshots in Python.

CUsersAdministratorDesktopScriptspythonexe CUsersAdministratorPycharmProjectspythonProject111py display �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� Traceback most recent call last File CUsersAdmini

原文地址: https://www.cveoy.top/t/topic/bvU5 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录