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

get_terminal_size 函数报错 #25

Closed
gojuukaze opened this issue Nov 11, 2022 · 3 comments
Closed

get_terminal_size 函数报错 #25

gojuukaze opened this issue Nov 11, 2022 · 3 comments

Comments

@gojuukaze
Copy link
Owner

    不按Stackoverflow增加VM选项时,提示这个:

`Traceback (most recent call last):
File "C:\Users\HideUserName\PycharmProjects\Select_Project_To_Build\Select_Project_To_Build.py", line 22, in
phase_choice = Phase.get_choice()

File "D:\Python38\lib\site-packages\terminal_layout\extensions\choice\choice.py", line 74, in get_choice
self.hidden_choices()

File "D:\Python38\lib\site-packages\terminal_layout\extensions\choice\choice.py", line 41, in hidden_choices
_, self.h_cache = self.ctl.get_terminal_size()

File "D:\Python38\lib\site-packages\terminal_layout\ctl.py", line 97, in get_terminal_size
size = get_terminal_size()

OSError: [WinError 6] 句柄无效。`

Originally posted by @Femtometer in #22 (comment)


Python版本3.8.13,Pycharm社区版:2022.2.3。
只在Pycharm报这个异常,try正常走的py3分支。

@gojuukaze gojuukaze added the bug Something isn't working label Nov 11, 2022
@gojuukaze gojuukaze changed the title 不按Stackoverflow增加VM选项时,提示这个: get_terminal_size 函数报错 Nov 11, 2022
@gojuukaze
Copy link
Owner Author

gojuukaze commented Nov 12, 2022

@Femtometer

我知道你的问题了,你是直接在pycharm里点击运行吧,这是不支持的,pycharm点击运行的话是通过它自带的终端来执行脚本。

想要在pycharm里运行的话可以通过底部菜单的terminal来运行

QQ浏览器截图20221112105040

@gojuukaze gojuukaze removed the bug Something isn't working label Nov 18, 2022
@Femtometer
Copy link

我分析也是Pycharm引起的,不过可以考虑识别出来,提示"Pycharm不支持直接运行,在Terminal运行"。

@gojuukaze
Copy link
Owner Author

我分析也是Pycharm引起的,不过可以考虑识别出来,提示"Pycharm不支持直接运行,在Terminal运行"。

#27 已添加

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